diff --git a/scripts/arcanist.php b/scripts/arcanist.php index 23b06dc0..1ef7f431 100755 --- a/scripts/arcanist.php +++ b/scripts/arcanist.php @@ -63,7 +63,7 @@ if (function_exists('posix_isatty') && !posix_isatty(STDOUT)) { } $args = array_values($args); -$working_directory = $_SERVER['PWD']; +$working_directory = getcwd(); try { diff --git a/src/workflow/shell-complete/ArcanistShellCompleteWorkflow.php b/src/workflow/shell-complete/ArcanistShellCompleteWorkflow.php index 238e2dd7..fa185391 100644 --- a/src/workflow/shell-complete/ArcanistShellCompleteWorkflow.php +++ b/src/workflow/shell-complete/ArcanistShellCompleteWorkflow.php @@ -64,7 +64,7 @@ EOTEXT // We have to build our own because if we requiresWorkingCopy() we'll throw // if we aren't in a .arcconfig directory. We probably still can't do much, // but commands can raise more detailed errors. - $working_copy = ArcanistWorkingCopyIdentity::newFromPath($_SERVER['PWD']); + $working_copy = ArcanistWorkingCopyIdentity::newFromPath(getcwd()); if ($working_copy->getProjectRoot()) { $repository_api = ArcanistRepositoryAPI::newAPIFromWorkingCopyIdentity( $working_copy);