fix(ci): quote candle -d args so PowerShell preserves the path
PowerShell 7's native-command argument passing breaks `-dSource=target\release\OpenCADStudio.exe` on the `=` sign, so candle received Source=`.exe` plus the actual path as a stray input filename and bailed with CNDL0103. Resolve each path to an absolute string up front and wrap every `-d<name>=<value>` in double quotes so the whole token reaches candle intact. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
db6e8873f2
commit
7ad59bf603
1 changed files with 17 additions and 6 deletions
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
|
|
@ -99,14 +99,25 @@ jobs:
|
||||||
# and light links it into the final .msi.
|
# and light links it into the final .msi.
|
||||||
$candle = Join-Path $env:WIX "bin\candle.exe"
|
$candle = Join-Path $env:WIX "bin\candle.exe"
|
||||||
$light = Join-Path $env:WIX "bin\light.exe"
|
$light = Join-Path $env:WIX "bin\light.exe"
|
||||||
|
# Resolve to absolute paths and pass each `-d<name>=<value>`
|
||||||
|
# as one quoted argument. PowerShell's native-command argument
|
||||||
|
# passing strips unquoted `-d…=…` strings on the `=` sign,
|
||||||
|
# which would otherwise hand candle an empty Source variable
|
||||||
|
# and `target\release\OpenCADStudio.exe` as a stray input
|
||||||
|
# filename.
|
||||||
|
$exePath = (Resolve-Path target\release\OpenCADStudio.exe).Path
|
||||||
|
$iconPath = (Resolve-Path packaging\windows\AppIcon.ico).Path
|
||||||
|
$wxsPath = (Resolve-Path packaging\windows\main.wxs).Path
|
||||||
|
$wixObj = Join-Path $PWD "packaging\windows\main.wixobj"
|
||||||
|
$msiPath = Join-Path $PWD "OpenCADStudio.msi"
|
||||||
& $candle -arch x64 `
|
& $candle -arch x64 `
|
||||||
-dVersion=$version `
|
"-dVersion=$version" `
|
||||||
-dSource=target\release\OpenCADStudio.exe `
|
"-dSource=$exePath" `
|
||||||
-dIcon=packaging\windows\AppIcon.ico `
|
"-dIcon=$iconPath" `
|
||||||
packaging\windows\main.wxs `
|
$wxsPath `
|
||||||
-out packaging\windows\main.wixobj
|
-out $wixObj
|
||||||
if ($LASTEXITCODE -ne 0) { throw "candle failed" }
|
if ($LASTEXITCODE -ne 0) { throw "candle failed" }
|
||||||
& $light packaging\windows\main.wixobj -out OpenCADStudio.msi
|
& $light $wixObj -out $msiPath
|
||||||
if ($LASTEXITCODE -ne 0) { throw "light failed" }
|
if ($LASTEXITCODE -ne 0) { throw "light failed" }
|
||||||
|
|
||||||
- name: Upload artifacts to release
|
- name: Upload artifacts to release
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue