@@ -4576,11 +4576,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
45764576} ;
45774577Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
45784578const tc = __importStar ( __webpack_require__ ( 533 ) ) ;
4579+ const cm = __importStar ( __webpack_require__ ( 470 ) ) ;
45794580const path = __importStar ( __webpack_require__ ( 622 ) ) ;
45804581const semver = __importStar ( __webpack_require__ ( 280 ) ) ;
45814582const httpm = __importStar ( __webpack_require__ ( 539 ) ) ;
45824583const sys = __importStar ( __webpack_require__ ( 737 ) ) ;
45834584const core_1 = __webpack_require__ ( 470 ) ;
4585+ const cp = __importStar ( __webpack_require__ ( 129 ) ) ;
4586+ const fs = __importStar ( __webpack_require__ ( 747 ) ) ;
45844587function downloadGo ( versionSpec , stable ) {
45854588 return __awaiter ( this , void 0 , void 0 , function * ( ) {
45864589 let toolPath ;
@@ -4602,6 +4605,7 @@ function downloadGo(versionSpec, stable) {
46024605 // extracts with a root folder that matches the fileName downloaded
46034606 const toolRoot = path . join ( extPath , 'go' ) ;
46044607 toolPath = yield tc . cacheDir ( toolRoot , 'go' , makeSemver ( match . version ) ) ;
4608+ addBinToPath ( ) ;
46054609 }
46064610 }
46074611 catch ( error ) {
@@ -4611,6 +4615,19 @@ function downloadGo(versionSpec, stable) {
46114615 } ) ;
46124616}
46134617exports . downloadGo = downloadGo ;
4618+ function addBinToPath ( ) {
4619+ return __awaiter ( this , void 0 , void 0 , function * ( ) {
4620+ let buf = cp . execSync ( 'go env GOPATH' ) ;
4621+ if ( buf ) {
4622+ let d = buf . toString ( ) . trim ( ) ;
4623+ let bp = path . join ( d , 'bin' ) ;
4624+ if ( fs . existsSync ( bp ) ) {
4625+ cm . addPath ( bp ) ;
4626+ }
4627+ }
4628+ } ) ;
4629+ }
4630+ exports . addBinToPath = addBinToPath ;
46144631function findMatch ( versionSpec , stable ) {
46154632 return __awaiter ( this , void 0 , void 0 , function * ( ) {
46164633 let archFilter = sys . getArch ( ) ;
0 commit comments