1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-01-11 07:11:03 +01:00

Unuse $argv in arc diff --background

Test Plan: This diff.

Reviewers: epriestley

Reviewed By: epriestley

CC: zeeg, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3550
This commit is contained in:
vrana 2012-09-24 11:32:38 -07:00
parent 32e123c515
commit 0a6be45f29
2 changed files with 12 additions and 6 deletions

View file

@ -64,6 +64,7 @@ abstract class ArcanistBaseWorkflow {
private $repositoryAPI;
private $workingCopy;
private $arguments;
private $passedArguments;
private $command;
private $repositoryEncoding;
@ -550,6 +551,10 @@ abstract class ArcanistBaseWorkflow {
return idx($this->arguments, $key, $default);
}
public function getPassedArguments() {
return $this->passedArguments;
}
final public function getCompleteArgumentSpecification() {
$spec = $this->getArguments();
$arc_config = $this->getArcanistConfiguration();
@ -559,6 +564,7 @@ abstract class ArcanistBaseWorkflow {
}
public function parseArguments(array $args) {
$this->passedArguments = $args;
$spec = $this->getCompleteArgumentSpecification();

View file

@ -380,14 +380,14 @@ EOTEXT
$background = $this->getArgument('background', !phutil_is_windows());
if ($background) {
$argv = $_SERVER['argv'];
// Insert after `arc diff`.
array_splice($argv, 2, 0, array('--recon', '--no-diff'));
$argv = $this->getPassedArguments();
if (!PhutilConsoleFormatter::getDisableANSI()) {
// Insert after `arc`.
array_splice($argv, 1, 0, array('--ansi'));
array_unshift($argv, '--ansi');
}
$lint_unit = new ExecFuture('php %Ls', $argv);
$lint_unit = new ExecFuture(
'php %s --recon diff --no-diff %Ls',
phutil_get_library_root('arcanist').'/../scripts/arcanist.php',
$argv);
$lint_unit->write('', true);
$lint_unit->start();
}