Skip to content

Commit 7c9c0c6

Browse files
committed
fix(powershell-extended): use SilentlyContinue for Update-Help to prevent build failures on 404 errors
Update-Help for Microsoft.PowerShell.ThreadJob returns HTTP 404, causing the build to fail with -ErrorAction Stop. Changed to -ErrorAction SilentlyContinue so missing help content is tolerated. Version: 2.1.0 -> 2.1.1
1 parent b7f6706 commit 7c9c0c6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/powershell-extended/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"legacyIds": [
55
"powershell"
66
],
7-
"version": "2.1.0",
7+
"version": "2.1.1",
88
"description": "Installs PowerShell on AMD64 and ARM64 architectures, with optional resources from the PowerShell Gallery via PSResourceGet. Includes a custom Oh My Posh terminal prompt theme and customizable profile files. Supports advanced installation options for PowerShell modules and scripts.",
99
"documentationURL": "https://github.com/jpawlowski/devcontainer-features/tree/main/src/powershell-extended",
1010
"licenseURL": "https://github.com/jpawlowski/devcontainer-features/tree/main/LICENSE.txt",

src/powershell-extended/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,11 @@ fi
421421
if [ "$POWERSHELL_UPDATE_MODULESHELP" = 'true' ]; then
422422
echo "Updating PowerShell Modules Help"
423423
if [ "${USERNAME}" = 'root' ]; then
424-
"$(command -v pwsh)" -NoLogo -NoProfile -Command "$prefs; Update-Help -Scope AllUsers -UICulture en-US -ErrorAction Stop -ProgressAction Ignore"
424+
"$(command -v pwsh)" -NoLogo -NoProfile -Command "$prefs; Update-Help -Scope AllUsers -UICulture en-US -ErrorAction SilentlyContinue -ProgressAction Ignore"
425425
touch "/root/.local/state/powershell/.updateHelpMarker"
426426
else
427427
# shellcheck disable=SC2140
428-
sudo -H -u "${USERNAME}" "$(command -v pwsh)" -NoLogo -NoProfile -Command "$prefs; Update-Help -Scope CurrentUser -UICulture en-US -ErrorAction Stop -ProgressAction Ignore; New-Item -Path "\${HOME}/.local/state/powershell/.updateHelpMarker" -ItemType File -Force"
428+
sudo -H -u "${USERNAME}" "$(command -v pwsh)" -NoLogo -NoProfile -Command "$prefs; Update-Help -Scope CurrentUser -UICulture en-US -ErrorAction SilentlyContinue -ProgressAction Ignore; New-Item -Path "\${HOME}/.local/state/powershell/.updateHelpMarker" -ItemType File -Force"
429429
fi
430430
fi
431431

0 commit comments

Comments
 (0)