Fix Windows smoke npm invocation

This commit is contained in:
Mohamed Boudra
2026-03-10 18:12:09 +07:00
parent 7b4ca8394b
commit 51bbebcdd5
2 changed files with 9 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## 0.1.24 - 2026-03-10
### Fixed
- Fixed the Windows desktop managed-daemon smoke test to rebuild packaged artifacts without relying on a bare `npm` executable lookup in GitHub Actions.
## 0.1.23 - 2026-03-10
### Fixed
- Fixed the Windows desktop managed-daemon smoke test to resolve repo paths correctly on GitHub Actions runners.

View File

@@ -362,8 +362,12 @@ async function ensurePackagedArtifact(binaryPath) {
if (process.env.PASEO_MANAGED_SMOKE_SKIP_BUILD === "1") {
return;
}
const npmExecPath = process.env.npm_execpath;
if (!npmExecPath) {
throw new Error("npm_execpath is required to build the packaged desktop artifact during smoke tests.");
}
try {
await execFileAsync("npm", ["run", "build"], {
await execFileAsync(process.execPath, [npmExecPath, "run", "build"], {
cwd: desktopRoot,
env: process.env,
maxBuffer: 20 * 1024 * 1024,