File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed
Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -1294,8 +1294,6 @@ function run() {
12941294 // since getting unstable versions should be explicit
12951295 let stable = ( core . getInput ( 'stable' ) || 'true' ) . toUpperCase ( ) === 'TRUE' ;
12961296 console . log ( `Setup go ${ stable ? 'stable' : '' } version spec ${ versionSpec } ` ) ;
1297- // if there's a globally install go and bin path, prefer that
1298- let addedBin = addBinToPath ( ) ;
12991297 if ( versionSpec ) {
13001298 let installDir = tc . find ( 'go' , versionSpec ) ;
13011299 if ( ! installDir ) {
@@ -1307,11 +1305,8 @@ function run() {
13071305 core . exportVariable ( 'GOROOT' , installDir ) ;
13081306 core . addPath ( path . join ( installDir , 'bin' ) ) ;
13091307 console . log ( 'Added go to the path' ) ;
1310- // if the global installed bin wasn't added,
1311- // we can add the bin just installed
1312- if ( ! addedBin ) {
1313- addBinToPath ( ) ;
1314- }
1308+ let added = addBinToPath ( ) ;
1309+ core . debug ( `add bin ${ added } ` ) ;
13151310 }
13161311 else {
13171312 throw new Error ( `Could not find a version that satisfied version spec: ${ versionSpec } ` ) ;
Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ export async function run() {
2222 `Setup go ${ stable ? 'stable' : '' } version spec ${ versionSpec } `
2323 ) ;
2424
25- // if there's a globally install go and bin path, prefer that
26- let addedBin = addBinToPath ( ) ;
2725 if ( versionSpec ) {
2826 let installDir : string | undefined = tc . find ( 'go' , versionSpec ) ;
2927
@@ -40,11 +38,8 @@ export async function run() {
4038 core . addPath ( path . join ( installDir , 'bin' ) ) ;
4139 console . log ( 'Added go to the path' ) ;
4240
43- // if the global installed bin wasn't added,
44- // we can add the bin just installed
45- if ( ! addedBin ) {
46- addBinToPath ( ) ;
47- }
41+ let added = addBinToPath ( ) ;
42+ core . debug ( `add bin ${ added } ` ) ;
4843 } else {
4944 throw new Error (
5045 `Could not find a version that satisfied version spec: ${ versionSpec } `
You can’t perform that action at this time.
0 commit comments