Skip to content

Commit

Permalink
fix: detach if not windows
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Oct 19, 2024
1 parent f16d851 commit 5f0e94e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export async function startVerdaccioServer({

const startServerPromise = () =>
new Promise<RegistryResult>((resolve, reject) => {
const isWindows = process.platform === 'win32';

executeProcess({
command: 'nx',
args: objectToCliArgs({
Expand All @@ -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) => {
Expand Down
1 change: 1 addition & 0 deletions projects/nx-verdaccio/src/internal/execute-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export type ProcessConfig = Omit<
SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
'stdio'
> & {
stdio?: 'pipe' | 'inherit' | 'ignore' | (StdioPipe | 'pipe' | 'inherit' | 'ignore')[];
command: string;
args?: string[];
verbose?: boolean;
Expand Down

0 comments on commit 5f0e94e

Please sign in to comment.