We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6a532c commit 63bd917Copy full SHA for 63bd917
src/main/lsp.ts
@@ -28,6 +28,7 @@ import {
28
import log from 'electron-log'
29
import Store from 'electron-store'
30
import fixPath from 'fix-path'
31
+import { fileSystem } from './fileSystem'
32
33
const writeFilePromise = promisify(fs.writeFile)
34
const lspDir = app.isPackaged
@@ -360,6 +361,10 @@ class LSPManager {
360
361
case 'go':
362
const goDir = path.join(lspDir, 'go')
363
try {
364
+ // Check $GOPATH, and remove $GOPATH/go.mod file
365
+ const goPath = cp.execSync('echo $GOPATH').toString().trim()
366
+ fs.accessSync(`${goPath}go.mod`, fs.constants.F_OK)
367
+ await fileSystem.unlinkSync(`${goPath}/go.mod`)
368
await promisify(cp.exec)(
369
'go install golang.org/x/tools/gopls@latest',
370
{
0 commit comments