Page MenuHomePhabricator

D15785.diff
No OneTemporary

D15785.diff

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

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)

Event Timeline