mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-02-02 09:58:23 +01:00
Fix an issue with "arc nrabch"
Summary: Fixes a minor issue from D14034. PHP doesn't like `clone null;`, and if you type a nonsense command like `arc nbrhch` (as I frequently do) we try to `clone null` here. Instead, just `return null;` if no workflow matches. Clone otherwise. Test Plan: - Ran `arc nbrhcanc` - Ran `arc branch` Reviewers: BYK, chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D14112
This commit is contained in:
parent
61fa644c4e
commit
083127c4cc
1 changed files with 7 additions and 1 deletions
|
@ -31,7 +31,13 @@ class ArcanistConfiguration extends Phobject {
|
|||
$command = 'version';
|
||||
}
|
||||
|
||||
return clone idx($this->buildAllWorkflows(), $command);
|
||||
$workflow = idx($this->buildAllWorkflows(), $command);
|
||||
|
||||
if (!$workflow) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return clone $workflow;
|
||||
}
|
||||
|
||||
public function buildAllWorkflows() {
|
||||
|
|
Loading…
Add table
Reference in a new issue