Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pathUtils: returns a default path for go incorrectly #1065

Closed
hyangah opened this issue Dec 28, 2020 · 2 comments
Closed

pathUtils: returns a default path for go incorrectly #1065

hyangah opened this issue Dec 28, 2020 · 2 comments

Comments

@hyangah
Copy link
Contributor

hyangah commented Dec 28, 2020

src/utils/pathUtils: return the default go path only if exists

https://go-review.googlesource.com/c/vscode-go/+/276493 meant
to add /usr/local/bin/go to the default path to search, but introduced
a bug - we shouldn't return the path if the go binary doesn't exist.

This causes other parts of the extension to fail to detect the problem
(incomplete go installation or misconfigured PATH issue) early but
confuse users later with other error messages.

This is a regression caused in v0.20.0

@hyangah hyangah modified the milestones: v0.20.0, v0.20.1 Dec 28, 2020
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/279727 mentions this issue: src/utils/pathUtils: return the default go path only if exists

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/280592 mentions this issue: [release] src/utils/pathUtils: return the default go path only if exists

gopherbot pushed a commit that referenced this issue Dec 28, 2020
https://go-review.googlesource.com/c/vscode-go/+/276493 meant
to add /usr/local/bin/go to the default path to search, but introduced
a bug - we shouldn't return the path if the go binary doesn't exist.

TODO: This function got complicated over time and deserves proper testing.

For #971
Fixes #1065

Change-Id: I3ddf90983a1f66d6d76a3f9a50eb528a93904f3c
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279727
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
(cherry picked from commit dd9c54f)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/280592
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
@golang golang locked and limited conversation to collaborators Dec 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants