From 5f0e94ea2b36b8097e66cfa0243e9a838a9741b7 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 19 Oct 2024 02:00:58 +0200 Subject: [PATCH] fix: detach if not windows --- .../src/executors/env-bootstrap/verdaccio-registry.ts | 4 ++++ projects/nx-verdaccio/src/internal/execute-process.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/projects/nx-verdaccio/src/executors/env-bootstrap/verdaccio-registry.ts b/projects/nx-verdaccio/src/executors/env-bootstrap/verdaccio-registry.ts index 4fb722e7..61772b1c 100644 --- a/projects/nx-verdaccio/src/executors/env-bootstrap/verdaccio-registry.ts +++ b/projects/nx-verdaccio/src/executors/env-bootstrap/verdaccio-registry.ts @@ -95,6 +95,8 @@ export async function startVerdaccioServer({ const startServerPromise = () => new Promise((resolve, reject) => { + const isWindows = process.platform === 'win32'; + executeProcess({ command: 'nx', args: objectToCliArgs({ @@ -106,6 +108,8 @@ export async function startVerdaccioServer({ storage, ...opt, }), + detached: !isWindows, + //stdio: ['ignore', 'ignore', 'ignore'], // Ignore I/O streams shell: true, observer: { onStdout: (stdout: string, childProcess) => { diff --git a/projects/nx-verdaccio/src/internal/execute-process.ts b/projects/nx-verdaccio/src/internal/execute-process.ts index 318cd13d..e358c547 100644 --- a/projects/nx-verdaccio/src/internal/execute-process.ts +++ b/projects/nx-verdaccio/src/internal/execute-process.ts @@ -32,6 +32,7 @@ export type ProcessConfig = Omit< SpawnOptionsWithStdioTuple, 'stdio' > & { + stdio?: 'pipe' | 'inherit' | 'ignore' | (StdioPipe | 'pipe' | 'inherit' | 'ignore')[]; command: string; args?: string[]; verbose?: boolean;