Skip to content

Commit

Permalink
fix(core): defer loading package manager until necessary (#29248)
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobLey authored Dec 7, 2024
1 parent de8b189 commit 5d61191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nx/src/utils/package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ export function readTargetsFromPackageJson(
const { scripts, nx, private: isPrivate } = packageJson ?? {};
const res: Record<string, TargetConfiguration> = {};
const includedScripts = nx?.includedScripts || Object.keys(scripts ?? {});
packageManagerCommand ??= getPackageManagerCommand();
for (const script of includedScripts) {
packageManagerCommand ??= getPackageManagerCommand();
res[script] = buildTargetFromScript(script, scripts, packageManagerCommand);
}
for (const targetName in nx?.targets) {
Expand Down

0 comments on commit 5d61191

Please sign in to comment.