Merge branch 'main' into pricingBrowser

pricingBrowser
Sanger2000 2023-03-29 19:36:37 -07:00
commit 3d0db7ae5c
1 changed files with 6 additions and 2 deletions

View File

@ -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',
{