Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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-infodoesn't entirely align. Then again, our various detectors don't align with each other. Ideally, I'd like to see those patched to useci-infoas 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-infodoesn't, soci-infowill 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-cimodule 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.