Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14618387
D21050.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21050.diff
View Options
diff --git a/src/toolset/workflow/ArcanistVersionWorkflow.php b/src/toolset/workflow/ArcanistVersionWorkflow.php
--- a/src/toolset/workflow/ArcanistVersionWorkflow.php
+++ b/src/toolset/workflow/ArcanistVersionWorkflow.php
@@ -48,15 +48,23 @@
);
foreach ($roots as $lib => $root) {
+ $is_git = false;
+
$working_copy = ArcanistWorkingCopy::newFromWorkingDirectory($root);
- $repository_api = $working_copy->newRepositoryAPI();
+ if ($working_copy) {
+ $repository_api = $working_copy->newRepositoryAPI();
+ if ($repository_api instanceof ArcanistGitAPI) {
+ $is_git = true;
+ }
+ }
- if (!$repository_api instanceof ArcanistGitAPI) {
- throw new ArcanistUsageException(
+ if (!$is_git) {
+ throw new PhutilArgumentUsageException(
pht(
- 'Library "%s" is not a Git working copy, so no version '.
+ 'Library "%s" (at "%s") is not a Git working copy, so no version '.
'information can be provided.',
- $lib));
+ $lib,
+ Filesystem::readablePath($root)));
}
// NOTE: Carefully execute these commands in a way that works on Windows
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 7:44 PM (15 h, 20 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6983953
Default Alt Text
D21050.diff (1 KB)
Attached To
Mode
D21050: Fix error behavior of "arc version" when it encounters a library which is not a working copy
Attached
Detach File
Event Timeline
Log In to Comment