Skip to content

Commit

Permalink
Merge branch 'main' into pricingBrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanger2000 committed Mar 30, 2023
2 parents bdd70b4 + c0b9199 commit 3d0db7a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/lsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,12 @@ class LSPManager {
try {
// Check $GOPATH, and remove $GOPATH/go.mod file
const goPath = cp.execSync('echo $GOPATH').toString().trim()
fs.accessSync(`${goPath}go.mod`, fs.constants.F_OK)
await fileSystem.unlinkSync(`${goPath}/go.mod`)
try {
fs.accessSync(`${goPath}/go.mod`, fs.constants.F_OK)
await fileSystem.unlinkSync(`${goPath}/go.mod`)
} catch (e) {
// ignore remove remove $GOPATH/go.mod file error, it may not exist
}
await promisify(cp.exec)(
'go install golang.org/x/tools/gopls@latest',
{
Expand Down

0 comments on commit 3d0db7a

Please sign in to comment.