Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
Show First 20 Lines • Show All 667 Lines • ▼ Show 20 Lines | for ($ii = 0; $ii < $size; $ii++) { | ||||
if (count($parts) == 2) { | if (count($parts) == 2) { | ||||
list($arg_key, $val) = $parts; | list($arg_key, $val) = $parts; | ||||
array_splice($args, $ii, 1, array('--'.$arg_key, $val)); | array_splice($args, $ii, 1, array('--'.$arg_key, $val)); | ||||
$size++; | $size++; | ||||
} | } | ||||
if (!array_key_exists($arg_key, $spec)) { | if (!array_key_exists($arg_key, $spec)) { | ||||
$corrected = ArcanistConfiguration::correctArgumentSpelling( | $corrected = PhutilArgumentSpellingCorrector::newFlagCorrector() | ||||
$arg_key, | ->correctSpelling($arg_key, array_keys($spec)); | ||||
array_keys($spec)); | |||||
if (count($corrected) == 1) { | if (count($corrected) == 1) { | ||||
PhutilConsole::getConsole()->writeErr( | PhutilConsole::getConsole()->writeErr( | ||||
pht( | pht( | ||||
"(Assuming '%s' is the British spelling of '%s'.)", | "(Assuming '%s' is the British spelling of '%s'.)", | ||||
'--'.$arg_key, | '--'.$arg_key, | ||||
'--'.head($corrected))."\n"); | '--'.head($corrected))."\n"); | ||||
$arg_key = head($corrected); | $arg_key = head($corrected); | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 1,381 Lines • Show Last 20 Lines |