File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,16 @@ const printSummary = require('./download-experimental-build-commands/print-summa
18
18
const run = async ( ) => {
19
19
try {
20
20
addDefaultParamValue ( '-r' , '--releaseChannel' , 'experimental' ) ;
21
+ addDefaultParamValue (
22
+ null ,
23
+ '--build' ,
24
+ await getLatestMasterBuildNumber ( true )
25
+ ) ;
21
26
22
27
const params = await parseParams ( ) ;
23
28
params . cwd = join ( __dirname , '..' , '..' ) ;
24
29
params . packages = await getPublicPackages ( true ) ;
25
30
26
- if ( ! params . build ) {
27
- params . build = await getLatestMasterBuildNumber ( true ) ;
28
- }
29
-
30
31
await checkEnvironmentVariables ( params ) ;
31
32
await downloadBuildArtifacts ( params ) ;
32
33
Original file line number Diff line number Diff line change @@ -17,18 +17,18 @@ const logger = createLogger({
17
17
storagePath : join ( __dirname , '.progress-estimator' ) ,
18
18
} ) ;
19
19
20
- const addDefaultParamValue = ( shortName , longName , defaultValue ) => {
20
+ const addDefaultParamValue = ( optionalShortName , longName , defaultValue ) => {
21
21
let found = false ;
22
22
for ( let i = 0 ; i < process . argv . length ; i ++ ) {
23
23
const current = process . argv [ i ] ;
24
- if ( current === shortName || current . startsWith ( `${ longName } =` ) ) {
24
+ if ( current === optionalShortName || current . startsWith ( `${ longName } =` ) ) {
25
25
found = true ;
26
26
break ;
27
27
}
28
28
}
29
29
30
30
if ( ! found ) {
31
- process . argv . push ( shortName , defaultValue ) ;
31
+ process . argv . push ( ` ${ longName } = ${ defaultValue } ` ) ;
32
32
}
33
33
} ;
34
34
You can’t perform that action at this time.
0 commit comments