Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Run the locked embed builder without a Windows command shim

pulse-triage[bot]fbe15144b546
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index bb8653c5a1..1778128b88 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -6264,6 +6264,8 @@ and runs the real embedded-asset build before Go tests. Connected Docker-agent
tests import the API package, whose embed is a compile-time prerequisite; an
empty directory or placeholder page is not a substitute. Windows reuses that
same dependency installation for its generated PowerShell command proof.
+The embedded build invokes the installed Vite CLI with the current Node
+executable, rather than spawning a Windows `.cmd` shim or resolving via npx.
`TestNativeAgentWorkflowBuildsRealFrontendBeforeRuntime` checks ordering and
all-platform coverage, with missing, conditional, late and stub-build controls.
Linux source checks and Windows cross-compilation do not establish hosted
diff --git a/frontend-modern/scripts/build-embed-assets.mjs b/frontend-modern/scripts/build-embed-assets.mjs
index 84663ba14c..cf7fca9614 100644
--- a/frontend-modern/scripts/build-embed-assets.mjs
+++ b/frontend-modern/scripts/build-embed-assets.mjs
@@ -11,7 +11,9 @@ const __dirname = path.dirname(__filename);
const frontendRoot = path.resolve(__dirname, '..');
const repoRoot = path.resolve(frontendRoot, '..');
const lockPath = path.join(repoRoot, 'tmp', 'locks', 'frontend-embed-build.lock');
-const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
+// Invoke the installed CLI with this Node executable. Windows .cmd shims
+// require a shell and are not portable child_process.spawn executables.
+const viteCLI = path.join(frontendRoot, 'node_modules', 'vite', 'bin', 'vite.js');
function run(command, args, options = {}) {
return new Promise((resolve, reject) => {
@@ -31,7 +33,7 @@ await withExclusiveLock(
lockPath,
async () => {
await syncPublicDocs();
- await run(npxCmd, ['vite', 'build'], { cwd: frontendRoot });
+ await run(process.execPath, [viteCLI, 'build'], { cwd: frontendRoot });
await syncEmbedDir({ lock: false });
},
{ description: 'frontend embedded asset build' },