From 0193967b080305bc4fe092f3eac3a57f7af8edcb Mon Sep 17 00:00:00 2001 From: Craigory Coppola Date: Wed, 26 Apr 2023 01:28:38 -0400 Subject: [PATCH] fix(nx-plugin): runNxCommand should default to using tmpProjPath as the cwd (#16562) --- packages/plugin/src/utils/testing-utils/commands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin/src/utils/testing-utils/commands.ts b/packages/plugin/src/utils/testing-utils/commands.ts index 1cbbee3b9755a..946b516f70734 100644 --- a/packages/plugin/src/utils/testing-utils/commands.ts +++ b/packages/plugin/src/utils/testing-utils/commands.ts @@ -18,7 +18,7 @@ export function runNxCommand( ): string { function _runNxCommand(c) { const execSyncOptions: ExecOptions = { - cwd: opts.cwd, + cwd: opts.cwd ?? tmpProjPath(), env: { ...process.env, ...opts.env }, }; if (fileExists(tmpProjPath('package.json'))) {