@@ -45,27 +45,27 @@ program
45
45
46
46
// Validate option values.
47
47
if ( name && ! / ^ [ a - z A - Z 0 - 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" ) ;
49
49
}
50
50
51
51
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" ) ;
53
53
}
54
54
55
55
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" ) ;
57
57
}
58
58
59
59
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" ) ;
61
61
}
62
62
63
63
if ( sdkVersion && / ^ [ a - z A - Z 0 - 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" ) ;
65
65
}
66
66
67
67
if ( errors . length ) {
68
- console . error ( 'ERROR : Invalid script arguments' ) ;
68
+ console . error ( 'error : Invalid script arguments' ) ;
69
69
70
70
throw new Error ( errors . join ( '\n' ) ) ;
71
71
}
0 commit comments