Skip to content

Commit

Permalink
Merge pull request #1924 from Automattic/fix/case-sensitive-env-compa…
Browse files Browse the repository at this point in the history
…rison

fix: case mismatch in environment identifier matcher
  • Loading branch information
luismulinari authored Jul 3, 2024
2 parents 0dffbad + 7b8b988 commit 4454f07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/cli/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ args.argv = async function ( argv, cb ) {
exit.withError( 'Environment production is not allowed for this command' );
}

const env = options.app.environments.find( cur => getEnvIdentifier( cur ) === options.env );
const env = options.app.environments.find(
cur => getEnvIdentifier( cur ).toLowerCase() === options.env.toLowerCase()
);

if ( ! env ) {
await trackEvent( 'command_childcontext_param_error', {
Expand Down

0 comments on commit 4454f07

Please sign in to comment.