File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,14 @@ export function getBinPathWithPreferredGopathGorootWithExplanation(
102
102
}
103
103
104
104
// Finally search PATH parts
105
- const pathFromPath = getBinPathFromEnvVar ( binname , getEnvPath ( ) , false ) ;
105
+ let pathFromPath = getBinPathFromEnvVar ( binname , getEnvPath ( ) , false ) ;
106
106
if ( pathFromPath ) {
107
+ if ( toolName === 'go' && pathFromPath === '/snap/bin/go' ) {
108
+ // Workaround for the snapd issue (golang/vscode-go#166)
109
+ // https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1849753
110
+ console . log ( 'using /snap/go/current/bin/go instead of /snap/bin/go (see golang/vscode-go#166)' ) ;
111
+ pathFromPath = '/snap/go/current/bin/go' ;
112
+ }
107
113
binPathCache [ toolName ] = pathFromPath ;
108
114
return { binPath : pathFromPath , why : found ( 'path' ) } ;
109
115
}
You can’t perform that action at this time.
0 commit comments