Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions scripts/dev-launcher.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@
import { spawn } from 'node:child_process';
import { readFileSync } from 'node:fs';
import { createServer } from 'node:net';
import { homedir } from 'node:os';
import { homedir, platform } from 'node:os';
import { dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { parse as parseYaml } from 'yaml';

// On Windows npm is actually npm.cmd — spawning plain 'npm' fails with ENOENT.
// The shell: true flag also lets Windows find the batch wrapper.
const npmCommand = platform() === 'win32' ? 'npm.cmd' : 'npm';

const __dirname = dirname(fileURLToPath(import.meta.url));
const repoRoot = resolve(__dirname, '..');

Expand Down Expand Up @@ -120,9 +124,9 @@ async function main() {
};

const child = spawn(
'npm',
npmCommand,
['--workspace', 'ui', 'run', 'dev:concurrent'],
{ cwd: repoRoot, env, stdio: 'inherit' },
{ cwd: repoRoot, env, stdio: 'inherit', shell: platform() === 'win32' },
);

const forward = (signal) => {
Expand Down