Page MenuHomePhabricator

D9504.diff
No OneTemporary

D9504.diff

diff --git a/src/console/PhutilInteractiveEditor.php b/src/console/PhutilInteractiveEditor.php
--- a/src/console/PhutilInteractiveEditor.php
+++ b/src/console/PhutilInteractiveEditor.php
@@ -58,6 +58,10 @@
$name = $this->getName();
$content = $this->getContent();
+ if (phutil_is_windows()) {
+ $content = str_replace("\n", "\r\n", $content);
+ }
+
$tmp = Filesystem::createTemporaryDirectory('edit.');
$path = $tmp.DIRECTORY_SEPARATOR.$name;
@@ -86,6 +90,10 @@
throw $ex;
}
+ if (phutil_is_windows()) {
+ $result = str_replace("\r\n", "\n", $result);
+ }
+
$this->setContent($result);
return $this->getContent();

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 7:39 AM (6 m, 49 s)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6792663
Default Alt Text
D9504.diff (687 B)

Event Timeline