Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add PowerShell dependency to winget manifests
Re-applies the change from PR #1497 which was reverted in PR #1548.

The original broke the workflow YAML because the PowerShell here-string
content and closing tag had zero indentation, which terminated the YAML
literal block scalar (run: |). Fixed by indenting the here-string body
to match the block indentation level; YAML strips the leading spaces,
leaving valid PowerShell with the closing tag at column 0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Loading branch information
SteveSandersonMS and Copilot committed Feb 19, 2026
commit ee89712238a280fa0429abe0f790f2399eed404a
22 changes: 21 additions & 1 deletion .github/workflows/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,24 @@ jobs:
.\wingetcreate.exe update $packageId `
--version $packageVersion `
--urls "$installerUrlx64|x64" "$installerUrlarm64|arm64" `
--submit
--out manifests

# Add PowerShell dependency to installer manifest
$installerManifest = Get-ChildItem -Path manifests -Filter "*.installer.yaml" -Recurse | Select-Object -First 1 -ExpandProperty FullName
if (-not $installerManifest) {
Write-Error "No installer manifest (*.installer.yaml) was found in the 'manifests' directory."
exit 1
}
$content = Get-Content -Path $installerManifest -Raw
$dependency = @"
Dependencies:
PackageDependencies:
- PackageIdentifier: Microsoft.PowerShell
MinimumVersion: "7.0.0"
Comment thread
SteveSandersonMS marked this conversation as resolved.
"@
# Insert dependency block before the Installers section
$content = $content -replace '(?m)^Installers:', "$dependency`nInstallers:"
Comment thread
SteveSandersonMS marked this conversation as resolved.
Comment thread
SteveSandersonMS marked this conversation as resolved.
Set-Content -Path $installerManifest -Value $content

# Submit the modified manifest
.\wingetcreate.exe submit manifests