File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -479,9 +479,10 @@ function exec(cmd) {
479479
480480try {
481481 const version = core . getInput ( 'version' ) ;
482- console . log ( `Installing foundationdb ${ version } (${ os . platform ( ) } )!` ) ;
482+ let platform = os . platform ( ) ;
483+ console . log ( `Installing foundationdb ${ version } (${ platform } )!` ) ;
483484 let base_url = `https://github.com/apple/foundationdb/releases/download/${ version } ` ;
484- switch ( os . platform ( ) ) {
485+ switch ( platform ) {
485486 case 'linux' : {
486487 let client_url = `${ base_url } /foundationdb-clients_${ version } -1_amd64.deb` ;
487488 exec ( `curl -L -O ${ client_url } ` ) ;
@@ -498,6 +499,9 @@ try {
498499 exec ( `sudo installer -pkg FoundationDB-${ version } .pkg -target /` ) ;
499500 break ;
500501 }
502+ default :
503+ throw Error ( `Unsupported OS platform: ${ platform } . Supported options are linux and darwin.`
504+ + ` Check that this action is being used with either ubuntu-latest or macos-latest.` ) ;
501505 }
502506
503507} catch ( error ) {
Original file line number Diff line number Diff line change @@ -10,9 +10,10 @@ function exec(cmd) {
1010
1111try {
1212 const version = core . getInput ( 'version' ) ;
13- console . log ( `Installing foundationdb ${ version } (${ os . platform ( ) } )!` ) ;
13+ let platform = os . platform ( ) ;
14+ console . log ( `Installing foundationdb ${ version } (${ platform } )!` ) ;
1415 let base_url = `https://github.com/apple/foundationdb/releases/download/${ version } ` ;
15- switch ( os . platform ( ) ) {
16+ switch ( platform ) {
1617 case 'linux' : {
1718 let client_url = `${ base_url } /foundationdb-clients_${ version } -1_amd64.deb` ;
1819 exec ( `curl -L -O ${ client_url } ` ) ;
2930 exec ( `sudo installer -pkg FoundationDB-${ version } .pkg -target /` ) ;
3031 break ;
3132 }
33+ default :
34+ throw Error ( `Unsupported OS platform: ${ platform } . Supported options are linux and darwin.`
35+ + ` Check that this action is being used with either ubuntu-latest or macos-latest.` ) ;
3236 }
3337
3438} catch ( error ) {
You can’t perform that action at this time.
0 commit comments