-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
cli: don't run update-notifier in CI environment #33
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 already detect CI in a handful of places and currently
ci-info
doesn't entirely align. Then again, our various detectors don't align with each other. Ideally, I'd like to see those patched to useci-info
as well (but not in this PR).For reference, our existing CI detectors are here:
cli/lib/config/defaults.js
Line 194 in ab3c62a
and here:
https://github.com/npm/npm-registry-fetch/blob/03dde52817d00996d8316b155832d8802f338236/config.js#L26
The latter one detects things
ci-info
doesn't, soci-info
will need patching before we can entirely switch over to it.There's also:
https://github.com/npm/npm-registry-client/blob/d70399bff938b04cd3ed7052f415c6ed2d6bd275/lib/initialize.js#L15
Which should probably be patched too, though we aren't/won't be using it any more in npm proper.
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.
BTW: The
is-ci
module is just a convenience wrapper aroundci-info
, that when used programmatically returns a boolean and when used from the command line uses the exit code to signal if it's being run on a CI server or not.