This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibigbug Sorry for the very late review.
Have you tested the case where http_proxy is not set in settings , but is set in the environment variable?
In that case will the value set in the environment variable make its way to the child process running the
go get
command?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ramya-rao-a Yeah. I'm sure http_proxy in environment variables and open VS code from this environment using
$ code
can makego get
work through proxy, though it's limited use case. User may often not open VS code through terminal and for OS X users (like me) and other Linux users, environment variables for terminal and GUI are always isolated, this is the main consideration for this PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibigbug I understand the use case you are trying to solve. My question was for the use case where a user might have set the env var for http_proxy, but not in settings. What happens then, with your code changes?
I tested your code in 2 scenarios in Windows, this is what I see for the
env
that gets passed to the child process running thego get
When

http_proxy
is set in env var but not in VS Code settingsWhen different values are set for

http_proxy
in env var and VS Code settingsYou will have to do 2 changes I believe