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
Mon, May 20, 4:25 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6303270
Default Alt Text
D9504.diff (687 B)

Event Timeline