See https://github.com/PowerShell/vscode-powershell/issues/1288#issuecomment-387255899 for the proposal.
The suggested form is:
"powershell.powerShellAdditionalExePaths": [
{
"versionName": "with-xterm-env-var",
"exePath": "pwsh",
"env": {
"TERM": "xterm"
}
}
]
This would require some input sanitisation to ensure the environment variables aren't an override...
For anyone interested, this is how we are doing this until env support lands for multi-variable and multi-params:
{
...
"configurations": [
{
...
"script": "Set-Item -Path Env:VarOneName -Value VarValue; & Set-Item -Path Env:VarTwoName -Value VarValue; & Set-Item -Path Env:VarThreeName -Value VarValue; & ${workspaceFolder}/scripts/build/script.ps1",
"args": [
"-ParamOneName ParamValue",
"-ParamTwoName ParamValue"
],
}
]
}
Hey there, tried using script, but it seems that script function is not allowed on vscode?
Any news about this feature please ?
Any news about this feature please ?
No news. We're still working through several high priority items in our backlog. This issue is marked as "up for grabs" to indicate that it's free for anyone to pick up and contribute a solution to.
Most helpful comment
No news. We're still working through several high priority items in our backlog. This issue is marked as "up for grabs" to indicate that it's free for anyone to pick up and contribute a solution to.