Description
Summary of the new feature
As a user of standardized pipeline automation (same build on over 50 DSC repos), I want to be able to set my Integrated Terminal session when I open the repository (set the $Env:PSModulePath for that session to path within the workspace, and alert of missing required modules defined in a RequiredModules.psd1
file).
Proposed technical implementation details (optional)
This could be handled by a task, currently we're running ./build.ps1 -tasks noop
, but it should runOn
when the folderOpen
, IN the integrated terminal.
The task looks like this:
{
"version": "2.0.0",
"_runner": "terminal",
"tasks": [
{
"label": "bootstrap_environment",
"type": "shell",
"command": "& ${cwd}/build.ps1",
"args": ["-Tasks","noop"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"runOptions": {
"runOn": "folderOpen"
},
"problemMatcher": [
//...
]
}
]
}
The only "missing" part here is that it's not running in the integrated terminal.
Even better would be to enable those tasks to be "Optionally Integrated within the VSCode PowerShell extension", so that we could run the same tasks either inside or outside the integrated terminal (useful to do validate a build/test run on a clean session).
We could imagine having powershell
extension configurations in settings.json
like so:
"powershell.integratedConsole.startupTask": "bootstrap_environment",
"powershell.tasks": [
"${bootstrap_environment}"
]