]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Warn about wrong ID in `arc download D8O88`
authorvrana <jakubv@fb.com>
Sun, 4 Mar 2012 07:55:50 +0000 (23:55 -0800)
committervrana <jakubv@fb.com>
Sun, 4 Mar 2012 11:16:32 +0000 (03:16 -0800)
Summary: It also disables `arc download F7312-rainbow`.

Test Plan:
  arc download D8O88
  arc download F7312-rainbow
  arc download F7312

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1768

src/workflow/download/ArcanistDownloadWorkflow.php

index 6c40f762f9c6c4db7768e9162e64f0a28bebbc23..4f7857d65ae2c9bf45eca54ff45ef88ee5c03ce1 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
- * Copyright 2011 Facebook, Inc.
+ * Copyright 2012 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -66,7 +66,7 @@ EOTEXT
     }
 
     $file = reset($argv);
-    if (!preg_match('/^F?\d+/', $file)) {
+    if (!preg_match('/^F?\d+$/', $file)) {
       throw new ArcanistUsageException("Specify file by ID, e.g. F123.");
     }