Page MenuHomePhabricator

project_init.diff

Authored By
epriestley
Nov 30 2012, 3:57 PM
Size
1 KB
Referenced Files
None
Subscribers
None

project_init.diff

diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php
index f53936c..4a40979 100644
--- a/src/workflow/ArcanistBaseWorkflow.php
+++ b/src/workflow/ArcanistBaseWorkflow.php
@@ -1408,11 +1408,20 @@ abstract class ArcanistBaseWorkflow {
if (!$project_id) {
$this->projectInfo = array();
} else {
- $this->projectInfo = $this->getConduit()->callMethodSynchronous(
- 'arcanist.projectinfo',
- array(
- 'name' => $project_id,
- ));
+ try {
+ $this->projectInfo = $this->getConduit()->callMethodSynchronous(
+ 'arcanist.projectinfo',
+ array(
+ 'name' => $project_id,
+ ));
+ } catch (ConduitClientException $ex) {
+ // TODO: Implement a proper query method that doesn't throw on
+ // project not found. We just swallow this because some pathways,
+ // like Git with uncommitted changes in a repository with a new
+ // project ID, may attempt to access project information before
+ // the project is created.
+ return array();
+ }
}
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/zrqiqatn7f6ph35n5cqs
Default Alt Text
project_init.diff (1 KB)

Event Timeline