Repository navigation
ci(desktop-release): run the dependency install step under bash on Windows - #12423
yiliang114 wants to merge 1 commit into
Conversation
…ndows
The step body is a bash conditional, but this workflow has no defaults.run
block and the step declared no shell, so windows-latest handed it to pwsh and
died with "Missing '(' after 'if'" before npm or pnpm ran. Every later step
skipped, which is why v0.24.2 published no Windows artifact while macOS and
Linux went green.
The nine other bash-bodied steps in this file already declare shell: 'bash'.
This one arrived with the pnpm switch in #11859 and missed it; ci.yml carries
the same snippet safely because it sets defaults.run.shell at workflow level.
Fixes #12414
|
Superseded — closing. #12400 ( For the record, the diagnosis in #12414 is confirmed by the logs. Run 35616657702 died at step 11 with I also swept the rest of What to watch next: the daily packaging check at 16:00 UTC should now take |
What this PR does
Declares
shell: 'bash'on theInstall Qwen Code dependenciesstep of the desktop release workflow, so the Windows build runs that step's bash conditional under Git Bash instead of handing it to pwsh. Three lines, no other change.Why it's needed
The step body became bash in #11859 (the pnpm switch). This workflow has no
defaults.runblock — unlikeci.yml, which is exactly why the same snippet is safe there — and each of its other nine bash-bodied steps declaresshell: 'bash'individually. This one arrived without it, so onwindows-latestthe runner wrote the body to a.ps1file and pwsh rejected line 2 withMissing '(' after 'if' in if statement.The job died in 56 s at step 11 of 38, every later step was skipped, and v0.24.2 published no Windows artifact while macOS arm64, macOS x64 and Linux x64 all succeeded.Nothing has touched the file since, so the daily packaging check has been red on Windows two days running (09-20 and 09-21), and v0.24.3 was cut today — the next desktop release fails the same way.
Reviewer Test Plan
How to verify
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'", thenParserError: ...ps1:2, then exit code 1 at step 11.C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}— precisely the ones that declareshell: 'bash'. Git Bash is present, so the declaration is the only thing missing.desktop-packaging-check.yml(or wait for the 16:00 UTC daily) and confirmBuild Windows x64gets past step 11 and reachesSmoke packaged application.Evidence (Before & After)
Before, verbatim from the run above:
After: not observable from a PR, because this workflow runs on
workflow_dispatch, on release, and on the daily schedule — not onpull_request. What was checked locally: the file still parses as YAML and has exactly oneInstall Qwen Code dependenciesstep, now carryingshell: bashwith its bash body intact; prettier reports no formatting change;.yamllint.ymldefines no line-length rule for the added comment.Tested on
Environment (optional)
N/A.
Risk & Scope
shell: 'bash'on Windows resolves to the Git Bash that eight sibling steps in the same job already use successfully, the step body is untouched, and Linux/macOS behaviour is identical because bash is already their default.tauri build, NSIS installer, packaged smoke) are unexercised and could surface a second, separate failure. The next packaging check will say.Linked Issues
Fixes #12414
中文说明
这个 PR 做了什么
给桌面发布 workflow 的
Install Qwen Code dependencies这一步声明shell: 'bash',让 Windows 构建用 Git Bash 跑这一步的 bash 条件语句,而不是交给 pwsh。三行,没有其他改动。为什么需要
这一步的内容是在 #11859(切 pnpm)时变成 bash 的。这个 workflow 没有
defaults.run块——ci.yml有,所以同样那段脚本在那里是安全的——而它其余九个 bash 步骤都是逐个写shell: 'bash'的。唯独这一步漏了,于是在windows-latest上 runner 把脚本体写进.ps1文件,pwsh 在第 2 行报Missing '(' after 'if' in if statement.,job 在 56 秒、38 步里的第 11 步就死了,后面全部 skipped,v0.24.2 因此没发出 Windows 产物,而 macOS arm64、macOS x64、Linux x64 同一次 run 全绿。此后没有任何 commit 再动过这个文件,所以每日 packaging check 在 Windows 上已经连红两天(09-20、09-21),而 v0.24.3 今天已经切了——下一次桌面发布会以同样方式失败。
评审测试计划
如何验证
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'",接着ParserError: ...ps1:2,然后第 11 步 exit code 1。C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}下跑成功的——正是那些写了shell: 'bash'的步骤。Git Bash 是存在的,所以缺的只有这个声明。desktop-packaging-check.yml(或等 16:00 UTC 的定时跑),确认Build Windows x64能过第 11 步并跑到Smoke packaged application。证据(改动前后)
改动前,逐字摘自上面那次 run:
改动后:从 PR 上观察不到,因为这个 workflow 只在
workflow_dispatch、发布和每日定时时跑,不在pull_request上跑。本地检查到的是:文件仍能正常解析为 YAML,Install Qwen Code dependencies只有一处且现在带着shell: bash、脚本体未变;prettier 无格式改动;.yamllint.yml没有对新增注释构成限制的行长规则。测试平台
环境(可选)
N/A。
风险与范围
shell: 'bash'解析到的就是同一个 job 里八个兄弟步骤已经在成功使用的 Git Bash;脚本体一个字没动;Linux/macOS 行为不变,因为它们本来就默认 bash。tauri build、NSIS 安装器、打包后 smoke)从未被执行,可能还藏着第二个独立故障。下一次 packaging check 会给出答案。关联 Issue
Fixes #12414