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

Flag to change exit status of npm query #609

Closed
wraithgar opened this issue Nov 29, 2022 · 2 comments
Closed

Flag to change exit status of npm query #609

wraithgar opened this issue Nov 29, 2022 · 2 comments

Comments

@wraithgar
Copy link
Member

We had discussed a flag that will allow folks to deterministically respond to the results of an npm query command, specifically exiting with a status code if there are results, or if there are no results.

The naming of the flags is pretty trivial to change, the bulk of the work is simply implementing them. We can bikeshed the flag name as we go.

@wojpawlik
Copy link

git uses --exit-code, jq --exit-status. I'd be fine with either.

Isn't implementation just adding 7 lines to https://github.com/npm/cli/blob/latest/lib/commands/query.js ?

@wraithgar
Copy link
Member Author

npm/cli#5966

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants