Skip to content

Commit 443dee0

Browse files
committed
fix(repo): clear NX_INVOCATION_ROOT_PID in run-native-target to avoid recursion false-positive
1 parent cd350c1 commit 443dee0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/run-native-target.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ if (
77
process.env.SKIP_NATIVE_TARGET !== 'true'
88
) {
99
const [target, project] = process.argv.slice(2);
10-
execSync(`nx run ${project}:${target}`, { stdio: 'inherit' });
10+
// Detach from the parent nx invocation chain so the recursive-task detector
11+
// in nx@23+ doesn't treat this sibling task as a recursive call.
12+
const { NX_INVOCATION_ROOT_PID, ...env } = process.env;
13+
execSync(`nx run ${project}:${target}`, { stdio: 'inherit', env });
1114
}

0 commit comments

Comments
 (0)