Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15420254
D15785.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
605 B
Referenced Files
None
Subscribers
None
D15785.diff
View Options
diff --git a/src/future/exec/PhutilExecutableFuture.php b/src/future/exec/PhutilExecutableFuture.php
--- a/src/future/exec/PhutilExecutableFuture.php
+++ b/src/future/exec/PhutilExecutableFuture.php
@@ -104,7 +104,18 @@
* @task config
*/
final public function setCWD($cwd) {
- $this->cwd = (string)$cwd;
+ $cwd = (string)$cwd;
+
+ if (!is_dir($cwd)) {
+ throw new Exception(
+ pht(
+ 'Preparing to run a command in directory "%s", but that '.
+ 'directory does not exist.',
+ $cwd));
+ }
+
+ $this->cwd = $cwd;
+
return $this;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 22, 12:35 PM (6 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7621118
Default Alt Text
D15785.diff (605 B)
Attached To
Mode
D15785: Make setCWD() with bad paths safer
Attached
Detach File
Event Timeline
Log In to Comment