File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
packages/compass-e2e-tests Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,7 @@ const argv = yargs(hideBin(process.argv))
4848 type : 'string' ,
4949 choices : [ 'x64' , 'arm64' ] ,
5050 demandOption : true ,
51- default : ( ) => {
52- if ( process . env . ARCH ) {
53- return process . env . ARCH ;
54- }
55- return process . arch ;
56- } ,
51+ default : ( ) => process . env . ARCH ?? process . arch ,
5752 } )
5853 . option ( 'skipDownload' , {
5954 type : 'boolean' ,
@@ -73,9 +68,16 @@ const argv = yargs(hideBin(process.argv))
7368 }
7469 }
7570
76- if ( ! ( argv . isWindows || argv . isOSX || argv . isUbuntu || argv . isRHEL ) ) {
71+ // hadron-build info can only do one platform & arch at a time
72+ const platformsCount = [
73+ argv . isWindows ,
74+ argv . isOSX ,
75+ argv . isUbuntu ,
76+ argv . isRHEL ,
77+ ] . filter ( ( x ) => x ) . length ;
78+ if ( platformsCount !== 1 ) {
7779 throw new Error (
78- 'Set at least one of IS_WINDOWS, IS_OSX, IS_UBUNTU, IS_RHEL'
80+ 'Set exactly one of IS_WINDOWS, IS_OSX, IS_UBUNTU, IS_RHEL to true '
7981 ) ;
8082 }
8183
You can’t perform that action at this time.
0 commit comments