@@ -863,7 +863,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
863863var __importStar = ( this && this . __importStar ) || function ( mod ) {
864864 if ( mod && mod . __esModule ) return mod ;
865865 var result = { } ;
866- if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
866+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
867867 __setModuleDefault ( result , mod ) ;
868868 return result ;
869869} ;
@@ -4338,7 +4338,7 @@ function escapeProperty(s) {
43384338/***/ 447 :
43394339/***/ ( function ( module ) {
43404340
4341- module . exports = { "ghc" :[ "8.10.2" , "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" ] } ;
4341+ module . exports = { "ghc" :[ "8.10.2" , "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.3" , "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" ] } ;
43424342
43434343/***/ } ) ,
43444344
@@ -8744,7 +8744,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
87448744var __importStar = ( this && this . __importStar ) || function ( mod ) {
87458745 if ( mod && mod . __esModule ) return mod ;
87468746 var result = { } ;
8747- if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
8747+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
87488748 __setModuleDefault ( result , mod ) ;
87498749 return result ;
87508750} ;
@@ -11008,7 +11008,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1100811008var __importStar = ( this && this . __importStar ) || function ( mod ) {
1100911009 if ( mod && mod . __esModule ) return mod ;
1101011010 var result = { } ;
11011- if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
11011+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
1101211012 __setModuleDefault ( result , mod ) ;
1101311013 return result ;
1101411014} ;
@@ -11024,10 +11024,22 @@ const path_1 = __webpack_require__(622);
1102411024function failed ( tool , version ) {
1102511025 throw new Error ( `All install methods for ${ tool } ${ version } failed` ) ;
1102611026}
11027- async function success ( tool , version , path ) {
11028- core . addPath ( path ) ;
11027+ async function configureOutputs ( tool , path , os ) {
1102911028 core . setOutput ( `${ tool } -path` , path ) ;
1103011029 core . setOutput ( `${ tool } -exe` , await io_1 . which ( tool ) ) ;
11030+ if ( tool == 'stack' ) {
11031+ if ( os === 'win32' ) {
11032+ core . exportVariable ( 'STACK_ROOT' , 'C:\\sr' ) ;
11033+ core . setOutput ( 'stack-root' , 'C:\\sr' ) ;
11034+ }
11035+ else {
11036+ core . setOutput ( 'stack-root' , `${ process . env . HOME } /.stack` ) ;
11037+ }
11038+ }
11039+ }
11040+ async function success ( tool , version , path , os ) {
11041+ core . addPath ( path ) ;
11042+ await configureOutputs ( tool , path , os ) ;
1103111043 core . info ( `Found ${ tool } ${ version } in cache at path ${ path } . Setup successful.` ) ;
1103211044 return true ;
1103311045}
@@ -11047,7 +11059,7 @@ function warn(tool, version) {
1104711059async function isInstalled ( tool , version , os ) {
1104811060 const toolPath = tc . find ( tool , version ) ;
1104911061 if ( toolPath )
11050- return success ( tool , version , toolPath ) ;
11062+ return success ( tool , version , toolPath , os ) ;
1105111063 const ghcupPath = `${ process . env . HOME } /.ghcup${ tool === 'ghc' ? `/ghc/${ version } ` : '' } /bin` ;
1105211064 const v = tool === 'cabal' ? version . slice ( 0 , 3 ) : version ;
1105311065 const aptPath = `/opt/${ tool } /${ v } /bin` ;
@@ -11075,7 +11087,7 @@ async function isInstalled(tool, version, os) {
1107511087 // default prior to this action being ran.
1107611088 if ( tool === 'ghc' && installedPath === ghcupPath )
1107711089 await exec_1 . exec ( await ghcupBin ( os ) , [ 'set' , version ] ) ;
11078- return success ( tool , version , installedPath ) ;
11090+ return success ( tool , version , installedPath , os ) ;
1107911091 }
1108011092 }
1108111093 if ( tool === 'cabal' && os !== 'win32' ) {
@@ -11084,7 +11096,7 @@ async function isInstalled(tool, version, os) {
1108411096 . then ( ( ) => ghcupPath )
1108511097 . catch ( ( ) => undefined ) ;
1108611098 if ( installedPath )
11087- return success ( tool , version , installedPath ) ;
11099+ return success ( tool , version , installedPath , os ) ;
1108811100 }
1108911101 return false ;
1109011102}
0 commit comments