File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ program
30
30
. option ( "--json" , "Output in JSON format" )
31
31
. option ( "-f,--force" , "Flag to confirm all warnings" )
32
32
. option ( "-a,--all" , "Flag to push all resources" )
33
- . option ( "--ids [id...]" , "Flag to pass list of ids for a giving action" )
33
+ . option ( "--id [id...]" , "Flag to pass list of ids for a giving action" )
34
34
. option ( "--report" , "Enable reporting when cli is crashing" )
35
35
. on ( "option:json" , ( ) => {
36
36
cliConfig . json = true ;
@@ -48,8 +48,8 @@ program
48
48
. on ( "option:all" , ( ) => {
49
49
cliConfig . all = true ;
50
50
} )
51
- . on ( "option:ids " , function ( ) {
52
- cliConfig . ids = this . opts ( ) . ids ;
51
+ . on ( "option:id " , function ( ) {
52
+ cliConfig . ids = this . opts ( ) . id ;
53
53
} )
54
54
. showSuggestionAfterError ( )
55
55
{ % if sdk . test != "true" % }
Original file line number Diff line number Diff line change @@ -154,7 +154,13 @@ const parseError = (err) => {
154
154
}
155
155
156
156
const actionRunner = (fn) => {
157
- return (...args) => fn(...args).catch(parseError);
157
+ return (...args) => {
158
+ if (cliConfig.all && (Array.isArray(cliConfig.ids) && cliConfig.ids.length !== 0)) {
159
+ error(`The '--all' and '--id' flags cannot be used together.`);
160
+ process.exit(1);
161
+ }
162
+ return fn(...args).catch(parseError)
163
+ };
158
164
}
159
165
160
166
const parseInteger = (value) => {
You can’t perform that action at this time.
0 commit comments