From f604c0c0a18cd859ebf8237eb0c7bf2786c14302 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 27 Feb 2018 14:32:23 +0100 Subject: [PATCH] fix cwd within sudo --- src/pharext/ExecCmd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pharext/ExecCmd.php b/src/pharext/ExecCmd.php index 5a6ee81..f16d105 100644 --- a/src/pharext/ExecCmd.php +++ b/src/pharext/ExecCmd.php @@ -61,7 +61,7 @@ class ExecCmd * @return int exit status */ private function suExec($command, $verbose = null) { - if (!($proc = proc_open($command, [STDIN,["pipe","w"],["pipe","w"]], $pipes))) { + if (!($proc = proc_open($command, [STDIN,["pipe","w"],["pipe","w"]], $pipes, getcwd()))) { $this->status = -1; throw new Exception("Failed to run {$command}"); } -- 2.30.2