shellwrap
shellwrap copied to clipboard
specify current working directory explicitly when executing shell commands
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).
- getcwd()
- (string) ShellWrap::pwd()
Thus we need to have the 4th parameter (getcwd()) specified explicitly here, also ideally it's unnecessary.