File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,17 @@ public function exec(string $cmd): UnixShell
4545 /* @phpstan-ignore-next-line */
4646 logger ()->info (ConsoleColor::yellow ('[EXEC] ' ) . ConsoleColor::green ($ cmd ));
4747 logger ()->debug ('Executed at: ' . debug_backtrace ()[0 ]['file ' ] . ': ' . debug_backtrace ()[0 ]['line ' ]);
48+ $ env_str = $ this ->getEnvString ();
49+ if (!empty ($ env_str )) {
50+ $ cmd = "{$ env_str } {$ cmd }" ;
51+ }
4852 if ($ this ->cd !== null ) {
4953 $ cmd = 'cd ' . escapeshellarg ($ this ->cd ) . ' && ' . $ cmd ;
5054 }
5155 if (!$ this ->debug ) {
5256 $ cmd .= ' 1>/dev/null 2>&1 ' ;
5357 }
54- $ env_str = $ this ->getEnvString ();
55- if (!empty ($ env_str )) {
56- $ env_str = "{$ env_str } " ;
57- }
58- f_passthru ("{$ env_str }{$ cmd }" );
58+ f_passthru ($ cmd );
5959 return $ this ;
6060 }
6161
You can’t perform that action at this time.
0 commit comments