Skip to content

Commit

Permalink
fix(core): cwd during dep-graph shouldn't vary based on daemon (#9223)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Mar 8, 2022
1 parent a2c5010 commit de7aa8e
Showing 1 changed file with 3 additions and 2 deletions.
@@ -1,4 +1,5 @@
import { ProjectGraph } from '@nrwl/devkit';
import { appRootPath } from '@nrwl/tao/src/utils/app-root';
import { ChildProcess, spawn, spawnSync } from 'child_process';
import { openSync, readFileSync } from 'fs';
import { ensureDirSync, ensureFileSync } from 'fs-extra';
Expand All @@ -23,7 +24,7 @@ export async function startInBackground(): Promise<ChildProcess['pid']> {
const out = openSync(DAEMON_OUTPUT_LOG_FILE, 'a');
const err = openSync(DAEMON_OUTPUT_LOG_FILE, 'a');
const backgroundProcess = spawn(process.execPath, ['../server/start.js'], {
cwd: __dirname,
cwd: appRootPath,
stdio: ['ignore', out, err],
detached: true,
windowsHide: true,
Expand Down Expand Up @@ -84,7 +85,7 @@ export function startInCurrentProcess(): void {
});

spawnSync(process.execPath, ['../server/start.js'], {
cwd: __dirname,
cwd: appRootPath,
stdio: 'inherit',
});
}
Expand Down

0 comments on commit de7aa8e

Please sign in to comment.