{"ref":"refs/heads/master","push_id":55211091,"commits":[{"sha":"6910fd77a4e34bc9e5b1953ee0a9457dbe3dedb8","author":{"email":"ef3ae35fd33e71a990b8ee41143d193a0dee6565@fb.com","name":"jungejason"},"url":"https://api.github.com/repos/facebook/arcanist/commits/6910fd77a4e34bc9e5b1953ee0a9457dbe3dedb8","message":"Use getcwd() which is more reliable than $_SERVER['PWD']\n\nSummary:\nin arcanist we are using $_SERVER['PWD'], but in some cases it\nis not returning the correct result. For example, when I'm using\nPhpStorm (an php IDE) to launch the script, $_SERVER['PWD'] returns the\npath of the binary of the IDE:\n/home/jungejason/tools/PhpStorm-107.658/bin, not the path where arcanist\nis at. getcwd() returns the correct value.\n\nOne difference between getcwd() and $_SERVER['PWD'] is that getcwd()\nresolves symlink where $_SERVER['PWD'] does not. From what I can see,\nusing realpath should work.\n\nTest Plan:\n* ran arcanist as normal and it worked;\n* run arcanist in PhpStorm and it worked.\n* created a symlink pointing to the repository inside which\nI ran the arc command, and it worked.\n* created a symlink pointing to arcanist project, run `.\n* resources/shell/bash-completion`  and it worked\n\nReviewers: epriestley\n\nReviewed By: epriestley\n\nCC: aran, epriestley\n\nDifferential Revision: https://secure.phabricator.com/D1285"}],"head":"6910fd77a4e34bc9e5b1953ee0a9457dbe3dedb8","size":1}