Page MenuHomePhabricator

D11464.id27566.diff
No OneTemporary

D11464.id27566.diff

diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php
--- a/src/workflow/ArcanistWorkflow.php
+++ b/src/workflow/ArcanistWorkflow.php
@@ -661,7 +661,8 @@
}
$more = array();
- for ($ii = 0; $ii < count($args); $ii++) {
+ $size = count($args);
+ for ($ii = 0; $ii < $size; $ii++) {
$arg = $args[$ii];
$arg_name = null;
$arg_key = null;
@@ -672,6 +673,14 @@
break;
} else if (!strncmp($arg, '--', 2)) {
$arg_key = substr($arg, 2);
+ $parts = explode('=', $arg_key, 2);
+ if (count($parts) == 2) {
+ list($arg_key, $val) = $parts;
+
+ array_splice($args, $ii, 1, array('--'.$arg_key, $val));
+ $size++;
+ }
+
if (!array_key_exists($arg_key, $spec)) {
$corrected = ArcanistConfiguration::correctArgumentSpelling(
$arg_key,
@@ -706,7 +715,7 @@
if (empty($options['param'])) {
$dict[$arg_key] = true;
} else {
- if ($ii == count($args) - 1) {
+ if ($ii == $size - 1) {
throw new ArcanistUsageException(pht(
"Option '%s' requires a parameter.",
$arg));

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 15, 12:04 PM (2 d, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6712756
Default Alt Text
D11464.id27566.diff (1 KB)

Event Timeline