1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-01-22 20:51:09 +01:00

Make arc install-certificate respect --conduit-uri

Summary: ...basically by adding "getConduitURI" and then falling through to
that, rather than repeating work from the main arc wrapper that setConduitURI in
the first place.   The explicit drawback here is the error message gets a little
more vague.

Test Plan:
- arc install-certifate --conduit-uri=https://secure.phabricator.com
// verified that the install flow was going for
https://secure.phabricator.com...!
- arc install-certificate https://secure.phabricator.com
// verified that the install flow was going for
https://secure.phabricator.com...!
- arc install-certificate
// verified that it reverted back to the .arcconfig conduit uri

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Maniphest Tasks: T794

Differential Revision: https://secure.phabricator.com/D1468
This commit is contained in:
Bob Trahan 2012-01-23 15:31:56 -08:00
parent a1a25f72f5
commit 03a9c516ea
3 changed files with 11 additions and 9 deletions

View file

@ -96,6 +96,15 @@ class ArcanistBaseWorkflow {
return $this;
}
/**
* Returns the URI the conduit connection within the workflow uses.
*
* @return string
* @task conduit
*/
final public function getConduitURI() {
return $this->conduitURI;
}
/**
* Open a conduit channel to the server which was previously configured by

View file

@ -132,18 +132,12 @@ EOTEXT
} else if (count($uri) == 1) {
$uri = reset($uri);
} else {
$working_copy = ArcanistWorkingCopyIdentity::newFromPath(
$this->getWorkingDirectory());
if (!$working_copy->getProjectRoot()) {
$conduit_uri = $this->getConduitURI();
if (!$conduit_uri) {
throw new ArcanistUsageException(
"Specify an explicit URI or run this command from within a project ".
"which is configured with a .arcconfig.");
}
$conduit_uri = $working_copy->getConduitURI();
if (!$conduit_uri) {
throw new ArcanistUsageException(
"This project's .arcconfig does not specify a Conduit URI.");
}
$uri = $conduit_uri;
}

View file

@ -8,7 +8,6 @@
phutil_require_module('arcanist', 'exception/usage');
phutil_require_module('arcanist', 'workflow/base');
phutil_require_module('arcanist', 'workingcopyidentity');
phutil_require_module('phutil', 'conduit/client');
phutil_require_module('phutil', 'console');