Skip to content

Commit 176ffe9

Browse files
Merge pull request #143 from WarehouseFinds/fix/psdepend-in-devcontainer
Update onCreateCommand to use PSDepend
2 parents b5b7f50 + 03f8e22 commit 176ffe9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
},
7575

7676
// Run once when the container is created
77-
"onCreateCommand": "pwsh -NoProfile -Command 'Install-PSResource -RequiredResourceFile /workspaces/PSScriptModule/requirements.psd1 -AcceptLicense -TrustRepository -Verbose'",
77+
"onCreateCommand": "pwsh -NoProfile -Command \"if (-not (Get-Module -ListAvailable -Name PSDepend)) { Install-Module -Name PSDepend -Scope CurrentUser -Force }; Invoke-PSDepend -Path '/workspaces/PSScriptModule/requirements.psd1' -Install -Import -Force -Verbose\"",
7878

7979
// Run after container starts (each time)
8080
"postStartCommand": "pwsh -NoProfile -Command 'Write-Host \"Container started.\"'",

0 commit comments

Comments
 (0)