Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
fix: understand messages.createError
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Mar 11, 2022
1 parent 76e3220 commit 9a64626
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion messages/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apiVersion configuration overridden at %s

Provide required name=value pairs for the command. Enclose any values that contain spaces in double quotes.

# error.InvalidVarargs
# error.InvalidVarargsFormat

Setting variables must be in the format <key>=<value> or <key>="<value with spaces>" but found %s.

Expand Down
4 changes: 2 additions & 2 deletions src/sfdxCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const messages = Messages.load('@salesforce/command', 'command', [
'error.RequiresProject',
'error.RequiresUsername',
'warning.ApiVersionOverride',
'error.InvalidVarargs',
'error.InvalidVarargsFormat',
'error.DuplicateVarargs',
'error.VarargsRequired',
'error.RequiresDevhubUsername',
Expand Down Expand Up @@ -476,7 +476,7 @@ export abstract class SfdxCommand extends Command {
const split = arg.split('=');

if (split.length !== 2) {
throw messages.createError('error.InvalidVarargs', [arg]);
throw messages.createError('error.InvalidVarargsFormat', [arg]);
}

const [name, value] = split;
Expand Down

0 comments on commit 9a64626

Please sign in to comment.