File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 4141 .\wingetcreate.exe update $packageId `
4242 --version $packageVersion `
4343 --urls "$installerUrlx64|x64" "$installerUrlarm64|arm64" `
44- --submit
44+ --out manifests
45+
46+ # Add PowerShell dependency to installer manifest
47+ $installerManifest = Get-ChildItem -Path manifests -Filter "*.installer.yaml" -Recurse | Select-Object -First 1 -ExpandProperty FullName
48+ if (-not $installerManifest) {
49+ Write-Error "No installer manifest (*.installer.yaml) was found in the 'manifests' directory."
50+ exit 1
51+ }
52+ $content = Get-Content -Path $installerManifest -Raw
53+ $dependency = @"
54+ Dependencies :
55+ PackageDependencies :
56+ - PackageIdentifier : Microsoft.PowerShell
57+ MinimumVersion : " 7.0.0"
58+ " @
59+ # Insert dependency block before the Installers section
60+ $content = $content -replace '(?m)^Installers:', " $dependency`nInstallers:"
61+ Set-Content -Path $installerManifest -Value $content
62+
63+ # Submit the modified manifest
64+ .\wingetcreate.exe submit manifests
You can’t perform that action at this time.
0 commit comments