Skip to content

fix(core): fall back to invoking PM in detection#34691

Merged
MaxKless merged 1 commit intomasterfrom
pm-invocation-fallback
Mar 4, 2026
Merged

fix(core): fall back to invoking PM in detection#34691
MaxKless merged 1 commit intomasterfrom
pm-invocation-fallback

Conversation

@MaxKless
Copy link
Copy Markdown
Collaborator

@MaxKless MaxKless commented Mar 4, 2026

Current Behavior

when you run things like pnpm nx@latest init, there might not be a pnpm lockfile yet. So nx commands will detect the PM as npm by default... even though the fact that the user is invoking the command via pnpm is a strong signal that that's the PM they want to use.

Expected Behavior

We fall back to detecting the invoking PM via env var if no lockfile exists.

@MaxKless MaxKless requested a review from a team as a code owner March 4, 2026 07:53
@MaxKless MaxKless requested a review from leosvelperez March 4, 2026 07:53
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 4, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit c1ac0cc
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69a7e4e4cad0470008ce2f27
😎 Deploy Preview https://deploy-preview-34691--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 4, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit c1ac0cc
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69a7e4e49232be00084327e4
😎 Deploy Preview https://deploy-preview-34691--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud bot commented Mar 4, 2026

View your CI Pipeline Execution ↗ for commit c1ac0cc

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 56m 41s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3m 15s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 8s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-04 08:54:00 UTC

@MaxKless MaxKless merged commit 4377c8b into master Mar 4, 2026
25 checks passed
@MaxKless MaxKless deleted the pm-invocation-fallback branch March 4, 2026 10:29
FrozenPandaz pushed a commit that referenced this pull request Mar 4, 2026
## Current Behavior
when you run things like `pnpm nx@latest init`, there might not be a
pnpm lockfile yet. So nx commands will detect the PM as `npm` by
default... even though the fact that the user is invoking the command
via `pnpm` is a strong signal that that's the PM they want to use.

## Expected Behavior
We fall back to detecting the invoking PM via env var if no lockfile
exists.

(cherry picked from commit 4377c8b)
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants