Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix args preprocessor #3072

Merged
merged 2 commits into from
Oct 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Preflight/ArgsPreprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ protected function checkMatchingOption($opt, $keyParam, $methodName)
return [$methodName, $hasValue ? null: true];
}

// If the option is not an exact match for the key, then the next
// character in the option after the key name must be an '='. Otherwise,
// we might confuse `--locale` for `--local`, etc.
if ($opt[strlen($key)] != '=') {
return [false, false];
}

// If $opt does not take a value, then we will ignore
// of the form --opt=value
if (!$hasValue) {
Expand Down