File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -21,24 +21,26 @@ Flags:
2121}
2222
2323const channelFlagIndex = process . argv . indexOf ( '--channel' ) ;
24-
25- let channel ;
26- if ( channelFlagIndex > - 1 ) {
27- channel = process . argv [ channelFlagIndex + 1 ] ;
28- } else {
24+ if ( channelFlagIndex < 0 ) {
2925 console . error ( 'Missing required --channel flag' ) ;
3026 process . exit ( 1 ) ;
3127}
28+ const channel = process . argv [ channelFlagIndex + 1 ] ;
29+ if ( ! channel ) {
30+ console . error ( '--channel value must be set' ) ;
31+ process . exit ( 1 ) ;
32+ }
3233
3334const inputFlagIndex = process . argv . indexOf ( '--input' ) ;
34-
35- let channelFilesFolder ;
36- if ( inputFlagIndex > - 1 ) {
37- channelFilesFolder = process . argv [ inputFlagIndex + 1 ] ;
38- } else {
35+ if ( inputFlagIndex < 0 ) {
3936 console . error ( 'Missing required --input flag' ) ;
4037 process . exit ( 1 ) ;
4138}
39+ const channelFilesFolder = process . argv [ inputFlagIndex + 1 ] ;
40+ if ( ! channelFilesFolder ) {
41+ console . error ( '--input value must be set' ) ;
42+ process . exit ( 1 ) ;
43+ }
4244
4345// Staging file filename suffixes are named according to `runner.arch`.
4446// https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
You can’t perform that action at this time.
0 commit comments