Summary: In Windows, you can't use `X=y cmd` syntax to set variables. Use "set X=y & cmd" instead.
Test Plan:
- Ran "arc diff" in a Mercurial repo in Windows, created D2367.
- Verified this does //not// cause 'HGPLAIN' to be set in the outer shell (where you type "arc diff").
Reviewers: Makinde, tido, indiefan, btrahan
Reviewed By: tido
CC: aran
Maniphest Tasks: T1179
Differential Revision: https://secure.phabricator.com/D2368
// There is an HGPLAIN environmental variable which enables "plain mode"
// and hopefully disables this stuff.
- $argv[0] = 'HGPLAIN=1 hg '.$argv[0];
+ if (phutil_is_windows()) {
+ $argv[0] = 'set HGPLAIN=1 & hg '.$argv[0];
+ } else {
+ $argv[0] = 'HGPLAIN=1 hg '.$argv[0];
+ }
$future = newv('ExecFuture', $argv);
$future->setCWD($this->getPath());