mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 23:02:41 +01:00
Fix "HGPLAIN" environmental variable in Windows
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
This commit is contained in:
parent
9a718f210a
commit
52e08cc6c5
1 changed files with 5 additions and 1 deletions
|
@ -42,7 +42,11 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
|
||||||
// There is an HGPLAIN environmental variable which enables "plain mode"
|
// There is an HGPLAIN environmental variable which enables "plain mode"
|
||||||
// and hopefully disables this stuff.
|
// and hopefully disables this stuff.
|
||||||
|
|
||||||
|
if (phutil_is_windows()) {
|
||||||
|
$argv[0] = 'set HGPLAIN=1 & hg '.$argv[0];
|
||||||
|
} else {
|
||||||
$argv[0] = 'HGPLAIN=1 hg '.$argv[0];
|
$argv[0] = 'HGPLAIN=1 hg '.$argv[0];
|
||||||
|
}
|
||||||
|
|
||||||
$future = newv('ExecFuture', $argv);
|
$future = newv('ExecFuture', $argv);
|
||||||
$future->setCWD($this->getPath());
|
$future->setCWD($this->getPath());
|
||||||
|
|
Loading…
Reference in a new issue