@@ -6953,9 +6953,8 @@ function getGo(versionSpec, stable, auth) {
6953
6953
//
6954
6954
try {
6955
6955
info = yield getInfoFromManifest ( makeSemver ( versionSpec ) , stable , auth ) ;
6956
- console . log ( `info is ${ info } ` ) ;
6957
6956
if ( info ) {
6958
- downloadPath = yield installGoVersion ( info , auth ) ;
6957
+ downloadPath = yield installGoVersion ( info , auth , undefined ) ;
6959
6958
}
6960
6959
else {
6961
6960
console . log ( 'Not found in manifest. Falling back to download directly from Go' ) ;
@@ -6981,7 +6980,7 @@ function getGo(versionSpec, stable, auth) {
6981
6980
throw new Error ( `Unable to find Go version '${ versionSpec } ' for platform ${ osPlat } and architecture ${ osArch } .` ) ;
6982
6981
}
6983
6982
try {
6984
- downloadPath = yield installGoVersion ( info , undefined ) ;
6983
+ downloadPath = yield installGoVersion ( info , undefined , 'go' ) ;
6985
6984
}
6986
6985
catch ( err ) {
6987
6986
throw new Error ( `Failed to download version ${ versionSpec } : ${ err } ` ) ;
@@ -6991,12 +6990,12 @@ function getGo(versionSpec, stable, auth) {
6991
6990
} ) ;
6992
6991
}
6993
6992
exports . getGo = getGo ;
6994
- function installGoVersion ( info , auth ) {
6993
+ function installGoVersion ( info , auth , subDir ) {
6995
6994
return __awaiter ( this , void 0 , void 0 , function * ( ) {
6996
6995
console . log ( `Acquiring ${ info . resolvedVersion } from ${ info . downloadUrl } ` ) ;
6997
6996
const downloadPath = yield tc . downloadTool ( info . downloadUrl , undefined , auth ) ;
6998
6997
console . log ( 'Extracting Go...' ) ;
6999
- const extPath = yield extractGoArchive ( downloadPath ) ;
6998
+ let extPath = yield extractGoArchive ( downloadPath ) ;
7000
6999
console . log ( 'Adding to the cache ...' ) ;
7001
7000
return yield tc . cacheDir ( extPath , 'go' , makeSemver ( info . resolvedVersion ) ) ;
7002
7001
} ) ;
0 commit comments