@@ -4334,7 +4334,7 @@ function escapeProperty(s) {
43344334/***/ 447 :
43354335/***/ ( function ( module ) {
43364336
4337- module . exports = { "ghc" :[ "8.10.1" , "8.8.3" , "8.8.2" , "8.8.1" , "8.6.5" , "8.6.4" , "8.6.3" , "8.6.2" , "8.6.1" , "8.4.4" , "8.4.3" , "8.4.2" , "8.4.1" , "8.2.2" , "8.0.2" , "7.10.3" ] , "cabal" :[ "3.2.0.0" , "3.0.0.0" , "2.4.1.0" , "2.4.0.0" , "2.2.0.0" ] , "stack" :[ "2.3.1" , "2.1.3" , "2.1.1" , "1.9.3" , "1.9.1" , "1.7.1" , "1.6.5" , "1.6.3" , "1.6.1" , "1.5.1" , "1.5.0" , "1.4.0" , "1.3.2" , "1.3.0" , "1.2.0" ] } ;
4337+ module . exports = { "ghc" :[ "8.10.1" , "8.8.4" , "8.8. 3", "8.8.2" , "8.8.1" , "8.6.5" , "8.6.4" , "8.6.3" , "8.6.2" , "8.6.1" , "8.4.4" , "8.4.3" , "8.4.2" , "8.4.1" , "8.2.2" , "8.0.2" , "7.10.3" ] , "cabal" :[ "3.2.0.0" , "3.0.0.0" , "2.4.1.0" , "2.4.0.0" , "2.2.0.0" ] , "stack" :[ "2.3.1" , "2.1.3" , "2.1.1" , "1.9.3" , "1.9.1" , "1.7.1" , "1.6.5" , "1.6.3" , "1.6.1" , "1.5.1" , "1.5.0" , "1.4.0" , "1.3.2" , "1.3.0" , "1.2.0" ] } ;
43384338
43394339/***/ } ) ,
43404340
@@ -11095,7 +11095,10 @@ async function apt(tool, version) {
1109511095 const toolName = tool === 'ghc' ? 'ghc' : 'cabal-install' ;
1109611096 const v = tool === 'cabal' ? version . slice ( 0 , 3 ) : version ;
1109711097 core . info ( `Attempting to install ${ toolName } ${ v } using apt-get` ) ;
11098- await exec_1 . exec ( `sudo -- sh -c "apt-get -y install ${ toolName } -${ v } "` ) ;
11098+ // Ignore the return code so we can fall back to ghcup
11099+ await exec_1 . exec ( `sudo -- sh -c "apt-get -y install ${ toolName } -${ v } "` , undefined , {
11100+ ignoreReturnCode : true
11101+ } ) ;
1109911102}
1110011103async function choco ( tool , version ) {
1110111104 core . info ( `Attempting to install ${ tool } ${ version } using chocolatey` ) ;
@@ -11108,10 +11111,12 @@ async function choco(tool, version) {
1110811111 '-m' ,
1110911112 '--no-progress' ,
1111011113 '-r'
11111- ] ) ;
11114+ ] , {
11115+ ignoreReturnCode : true
11116+ } ) ;
1111211117}
1111311118async function ghcupBin ( os ) {
11114- const v = '0.1.5 ' ;
11119+ const v = '0.1.8 ' ;
1111511120 const cachedBin = tc . find ( 'ghcup' , v ) ;
1111611121 if ( cachedBin )
1111711122 return path_1 . join ( cachedBin , 'ghcup' ) ;
@@ -11122,8 +11127,10 @@ async function ghcupBin(os) {
1112211127async function ghcup ( tool , version , os ) {
1112311128 core . info ( `Attempting to install ${ tool } ${ version } using ghcup` ) ;
1112411129 const bin = await ghcupBin ( os ) ;
11125- await exec_1 . exec ( bin , [ tool === 'ghc' ? 'install' : 'install-cabal' , version ] ) ;
11126- if ( tool === 'ghc' )
11130+ const returnCode = await exec_1 . exec ( bin , [ tool === 'ghc' ? 'install' : 'install-cabal' , version ] , {
11131+ ignoreReturnCode : true
11132+ } ) ;
11133+ if ( returnCode === 0 && tool === 'ghc' )
1112711134 await exec_1 . exec ( bin , [ 'set' , version ] ) ;
1112811135}
1112911136
0 commit comments