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
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
} 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;
}
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');