-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[vscode] support env variable substitution #5811
Conversation
VS Code doc: https://code.visualstudio.com/docs/editor/variables-reference#_environment-variables Signed-off-by: Anton Kosyakov <[email protected]>
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.
I've tested the PR with several simple tasks, like the following:
}
"label": "test env var",
"type": "shell",
"command": "sleep 1 && echo ${env:USER}"
}
Works well!
@azatsarynnyy Would you be fine if i assign you for reviews more often? We need help with testing and ensuring quality. Even half an hour couple days a week would help. |
@akosyakov sure, I don't mind 🙂 |
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.
Works well :)
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.
It works as advertised!
Tested with command
and args
.
What it does
support
env:NAME
variable substitution, see VS Code doc: https://code.visualstudio.com/docs/editor/variables-reference#_environment-variablesHow to test
Modify launch configuration to reference some env variable and launch it. See for example how
PATH
env variable is referenced inRun Mocha Test
configuration below, and then PATH value is printed to the debug console:Review checklist
Reminder for reviewers