File tree 1 file changed +12
-10
lines changed
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -21,24 +21,26 @@ Flags:
21
21
}
22
22
23
23
const 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 ) {
29
25
console . error ( 'Missing required --channel flag' ) ;
30
26
process . exit ( 1 ) ;
31
27
}
28
+ const channel = process . argv [ channelFlagIndex + 1 ] ;
29
+ if ( ! channel ) {
30
+ console . error ( '--channel value must be set' ) ;
31
+ process . exit ( 1 ) ;
32
+ }
32
33
33
34
const 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 ) {
39
36
console . error ( 'Missing required --input flag' ) ;
40
37
process . exit ( 1 ) ;
41
38
}
39
+ const channelFilesFolder = process . argv [ inputFlagIndex + 1 ] ;
40
+ if ( ! channelFilesFolder ) {
41
+ console . error ( '--input value must be set' ) ;
42
+ process . exit ( 1 ) ;
43
+ }
42
44
43
45
// Staging file filename suffixes are named according to `runner.arch`.
44
46
// https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
You can’t perform that action at this time.
0 commit comments