Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15467614
D9348.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
949 B
Referenced Files
None
Subscribers
None
D9348.id.diff
View Options
diff --git a/src/future/exec/ExecFuture.php b/src/future/exec/ExecFuture.php
--- a/src/future/exec/ExecFuture.php
+++ b/src/future/exec/ExecFuture.php
@@ -624,6 +624,18 @@
$pipes = array();
+ if (phutil_is_windows()) {
+ // See T4395. proc_open under Windows uses "cmd /C [cmd]", which will
+ // strip the first and last quote when there aren't exactly two quotes
+ // (and some other conditions as well). This results in a command that
+ // looks like `command" "path to my file" "something someting` which is
+ // clearly wrong. By surrounding the command string with quotes we can
+ // be sure this process is harmless.
+ if (strpos($unmasked_command, '"') !== false) {
+ $unmasked_command = '"'.$unmasked_command.'"';
+ }
+ }
+
// NOTE: See note above about Phage.
if (class_exists('PhutilErrorTrap')) {
$trap = new PhutilErrorTrap();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 4, 4:52 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7600419
Default Alt Text
D9348.id.diff (949 B)
Attached To
Mode
D9348: Fix lint when working on windows
Attached
Detach File
Event Timeline
Log In to Comment