Summary:
Right now, if you specify "/api" instead of "/api/" the entire world breaks in a
horrible way. Generally, this whole thing is silly. Just use the right path.
Test Plan:
Edited .arcconfig to use the "wrong" path, so this diff demonstrates the change
works.
Reviewed By: llorca
Reviewers: jungejason, llorca, aran, tuomaspelkonen
CC: aran, llorca, epriestley
Differential Revision: 506
{
"project_id" : "arcanist",
- "conduit_uri" : "https://secure.phabricator.com/api/",
+ "conduit_uri" : "https://secure.phabricator.com/",
"lint_engine" : "PhutilLintEngine",
"unit_engine" : "PhutilUnitTestEngine",
"remote_hooks_installed" : true,
throw new ArcanistUsageException(
"No Conduit URI is specified in the .arcconfig file for this project. ".
"Specify the Conduit URI for the host Differential is running on.");
+ } else {
+ // Set the URI path to '/api/'. TODO: Originally, I contemplated letting
+ // you deploy Phabricator somewhere other than the domain root, but ended
+ // up never pursuing that. We should get rid of all "/api/" silliness
+ // in things users are expected to configure. This is already happening
+ // to some degree, e.g. "arc install-certificate" does it for you.
+ $conduit_uri = new PhutilURI($conduit_uri);
+ $conduit_uri->setPath('/api/');
+ $conduit_uri = (string)$conduit_uri;
}
$conduit = new ConduitClient($conduit_uri);
$workflow->setConduit($conduit);