fix: don't read envs when explicitly not in CI#140
Conversation
|
Diff looks a bit icky, but it's literally just wrapping the vendors.forEach with |
|
Tested with Works as expected. |
|
Thanks @karl-run |
|
This may have constituted a breaking change btw. We're still investigating but it broke CI tests in npm's publishing library. ETA: All good. We had a mocked environment that was setting |
Tests for libnpmpublish fail with ci-info@4.3.1 ref: watson/ci-info#140
|
@wraithgar . Apologies, Yes its indeed looks like a breaking change, since the vendor constant is set now regardless of CI true/false until v4.3.0.
Though it was the expected, given the no. of users and not sure how the vendor constants are being used currently, I am considering publishing a patch reverting this change. And may be put this in v5 may be. Open to thoughts. |
This is an EXTREMELY grey area. What does The code says: But this ONLY applies to As one of the developers of npm I am no stranger to users relying on bugs, and when we fix those bugs folks have something break. It's a frustrating experience for everyone. I would tend towards leaving the change, and adding language to the README.md to avoid confusion in the future. |
|
My bad, Missed the comment. Agreed. And yes, will add this behavior to README. |

Should fix #139.