-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): version option should display global and local installation separately #15911
feat(core): version option should display global and local installation separately #15911
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
647cf97
to
0d80207
Compare
packages/nx/bin/nx.ts
Outdated
? null | ||
: require('../package.json').version; | ||
|
||
process.env.GLOBAL_NX_VERSION ??= GLOBAL_NX_VERSION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is set on process.env
just so we can reach it in report
? Could we set it on global
instead? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could - we don't currently set anything on global
though. I'll leave it up to you, if you want it swapped we can swap it out but I honestly think the resulting code will be uglier and the potential side effects more prominent
0d80207
to
678a4e1
Compare
678a4e1
to
1374610
Compare
1374610
to
d1a4674
Compare
d1a4674
to
a10de2b
Compare
a10de2b
to
969a00d
Compare
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. |
Current Behavior
nx --version
only reports the locally installed Nx version, and throws when outside of a workspaceExpected Behavior
nx --version
can report the global Nx version if available, and doesn't throw if running it outside of a workspace.Related Issue(s)
Fixes #15825