Skip to content
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

Fix --version to actually give the right value #2604

Merged
merged 1 commit into from
Sep 1, 2022
Merged

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Sep 1, 2022

The default implementation of yargs.version() is basically always going to be wrong since it uses pkg-up to find the nearest package.json upwards from the process.cwd() (implementation here).

Fixes #2550

@rwjblue rwjblue added the bug label Sep 1, 2022
The default implementation of `yargs.version()` is _basically_ always
going to be wrong since it uses `pkg-up` to find the nearest
`package.json` upwards from the `process.cwd()`.
@rwjblue rwjblue merged commit 723a7b5 into master Sep 1, 2022
@rwjblue rwjblue deleted the fix-version branch September 1, 2022 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--version doesn't work -- prints the version of the package.json at your CWD
2 participants