fix: invoke Windows copy through cmd in Makefile#8302
Conversation
PR Review: fix: invoke Windows copy through cmd in MakefileRecommendation: can merge SummaryThis is a targeted follow-up to #8293. The previous change replaced The fix wraps both Correctness
Risks / Considerations
TestingNo automated unit tests apply here — CI itself is the test. The PR description documents that the two affected Windows CI jobs ( VerdictThe change is correct, minimal, well-reasoned, and handles both affected call sites consistently. The |
|
looking into the failures, I've got a couple ideas but need to verify |
|
opting for a different solution. I had options here, but there were undocumented shell requirements. I think this is the most flexible, but happy to discuss if need be. |
|
Follow-up review — new commit since last review. New commit reviewed
The author replaced the Analysis of the new approachpowershell -NoLogo -NoProfile -NonInteractive -Command "Copy-Item -Force -ErrorAction Stop -LiteralPath 'src-tauri/target/release/jan-cli.exe' -Destination 'src-tauri/resources/bin/jan-cli.exe'"Correctness:
Robustness: CI status: All checks pass — Recommendation: can mergeThe PowerShell approach is correct, well-parameterized, and CI-verified. Both affected targets are updated consistently. Ready to merge. |
Describe Your Changes
Follow-up to #8293.
That change replaced
cpwith Windowscopyfor thejan-cli.execopy step. This worked in local Windows builds, but the self-hosted Windows CI runners invoke the Make recipe differently: GNU Make tried to launchcopydirectly viaCreateProcess.On Windows,
copyis acmd.exebuilt-in, not a standalone executable, so both WindowsLinter & Testpipelines failed after the Rust build succeeded:test-on-windows (mcafee)test-on-windows (bit-defender)The failure was:
process_begin: CreateProcess(NULL, copy src-tauri\target\release\jan-cli.exe src-tauri\resources\bin\jan-cli.exe, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [Makefile:223: build-cli] Error 2
Fixes Issues
Linter & Testpush failures ontest-on-windows (mcafee)andtest-on-windows (bit-defender)after fix: use Windows copy command in build-cli Makefile target #8293.