Skip to content

Commit adbfd07

Browse files
committed
Match Commander error output format
1 parent fcc4bc2 commit adbfd07

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cli.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,27 @@ program
4545

4646
// Validate option values.
4747
if (name && !/^[a-zA-Z0-9]{1,40}$/.test(name) || !name) {
48-
errors.push(' --name allowed values: Up to 40 alphanumeric characters');
48+
errors.push(" option '--name <value>' allows up to 40 alphanumeric characters");
4949
}
5050

5151
if (description && !/^[\w-.,!? ]{1,100}$/.test(description) || !description) {
52-
errors.push(' --description allowed values: Up to 100 alphanumeric and -.,!? characters');
52+
errors.push(" option '--description <value>' allows up to 100 alphanumeric and -.,!? characters");
5353
}
5454

5555
if (prefix && !/^\/[\w-]{0,100}$/.test(prefix)) {
56-
errors.push(' --prefix allowed values: Up to 100 alphanumeric and - characters');
56+
errors.push(" option '--prefix <path>' allows up to 100 alphanumeric and - characters");
5757
}
5858

5959
if (timeout && /^[\d]{1,2}$/.test(timeout)) {
60-
errors.push(' --timeout allowed values: Up to 2 numeric characters');
60+
errors.push(" option '--timeout <number>' allows up to 2 numeric characters");
6161
}
6262

6363
if (sdkVersion && /^[a-zA-Z0-9]{1,40}$/.test(sdkVersion)) {
64-
errors.push(' --sdk-version allowed values: Up to 40 numeric and . characters');
64+
errors.push(" option '--sdk-version <number>' allows up to 40 numeric and . characters");
6565
}
6666

6767
if (errors.length) {
68-
console.error('ERROR: Invalid script arguments');
68+
console.error('error: Invalid script arguments');
6969

7070
throw new Error(errors.join('\n'));
7171
}

0 commit comments

Comments
 (0)