Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/MrRio/ShellWrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@ private static function __run($arguments)
2 => array('pipe', 'w') // Stderr
);

$process = proc_open($shell, $descriptor_spec, $pipes);
// If you use function chdir() to change working directory to a different directory first, following two
// statements should still return same directories. However, in Travis CI they return different directories back
// (the 2nd one returns the directory where the PHP script was invoked).
// 1. getcwd()
// 2. (string) ShellWrap::pwd()
// Thus we have the 4th parameter (getcwd()) specified explicitly here, also ideally it's unnecessary.
$process = proc_open($shell, $descriptor_spec, $pipes, getcwd());

if (is_resource($process)) {

Expand Down