File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 4444 --out manifests
4545
4646 # Add PowerShell dependency to installer manifest
47- $installerManifest = Get-ChildItem -Path manifests -Filter "*.installer.yaml" -Recurse | Select-Object -First 1
48- $content = Get-Content $installerManifest -Raw
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
4953 $dependency = @"
5054Dependencies :
5155 PackageDependencies :
@@ -54,7 +58,7 @@ Dependencies:
5458" @
5559 # Insert dependency block before the Installers section
5660 $content = $content -replace '(?m)^Installers:', " $dependency`nInstallers:"
57- Set-Content -Path $installerManifest -Value $content -NoNewline
61+ Set-Content -Path $installerManifest -Value $content
5862
5963 # Submit the modified manifest
6064 .\wingetcreate.exe submit manifests
You can’t perform that action at this time.
0 commit comments