mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Stop arc from triggering bogus exceptions.
This commit is contained in:
parent
c44c4cf988
commit
db9f629499
1 changed files with 6 additions and 4 deletions
|
@ -66,7 +66,7 @@ try {
|
||||||
phutil_load_library($library_root);
|
phutil_load_library($library_root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$user_config = array();
|
$user_config = array();
|
||||||
$user_config_path = getenv('HOME').'/.arcrc';
|
$user_config_path = getenv('HOME').'/.arcrc';
|
||||||
if (Filesystem::pathExists($user_config_path)) {
|
if (Filesystem::pathExists($user_config_path)) {
|
||||||
|
@ -117,6 +117,7 @@ try {
|
||||||
$workflow->setWorkingCopy($working_copy);
|
$workflow->setWorkingCopy($working_copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$set_guid = false;
|
||||||
if ($need_conduit) {
|
if ($need_conduit) {
|
||||||
$conduit_uri = $working_copy->getConduitURI();
|
$conduit_uri = $working_copy->getConduitURI();
|
||||||
if (!$conduit_uri) {
|
if (!$conduit_uri) {
|
||||||
|
@ -127,7 +128,7 @@ try {
|
||||||
$conduit = new ConduitClient($conduit_uri);
|
$conduit = new ConduitClient($conduit_uri);
|
||||||
$conduit->setTraceMode($config_trace_mode);
|
$conduit->setTraceMode($config_trace_mode);
|
||||||
$workflow->setConduit($conduit);
|
$workflow->setConduit($conduit);
|
||||||
|
|
||||||
$hosts_config = idx($user_config, 'hosts', array());
|
$hosts_config = idx($user_config, 'hosts', array());
|
||||||
$host_config = idx($hosts_config, $conduit_uri, array());
|
$host_config = idx($hosts_config, $conduit_uri, array());
|
||||||
$user_name = idx($host_config, 'user', getenv('USER'));
|
$user_name = idx($host_config, 'user', getenv('USER'));
|
||||||
|
@ -143,10 +144,11 @@ try {
|
||||||
'user' => $user_name,
|
'user' => $user_name,
|
||||||
'certificate' => $certificate,
|
'certificate' => $certificate,
|
||||||
));
|
));
|
||||||
|
|
||||||
$workflow->setUserName($user_name);
|
$workflow->setUserName($user_name);
|
||||||
$user_phid = idx($connection, 'userPHID');
|
$user_phid = idx($connection, 'userPHID');
|
||||||
if ($user_phid) {
|
if ($user_phid) {
|
||||||
|
$set_guid = true;
|
||||||
$workflow->setUserGUID($user_phid);
|
$workflow->setUserGUID($user_phid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +159,7 @@ try {
|
||||||
$workflow->setRepositoryAPI($repository_api);
|
$workflow->setRepositoryAPI($repository_api);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($need_auth && !$workflow->getUserGUID()) {
|
if ($need_auth && !$set_guid) {
|
||||||
$user_name = getenv('USER');
|
$user_name = getenv('USER');
|
||||||
$user_find_future = $conduit->callMethod(
|
$user_find_future = $conduit->callMethod(
|
||||||
'user.find',
|
'user.find',
|
||||||
|
|
Loading…
Reference in a new issue