chromaui/chromatic-cli

Dont check for Chromatic-package-update in CI-environment

Closed this issue · 1 comments

Bug report

I don't think it makes sense to check for an updated version of Chromatic in a CI-environment. Please check for the presence of the environment variable "CI" as many other tools do.

Also not all local NPM-repositories support the current implementation and there is no option to skip-update-check (at this time):

Using custom npm registry: https://pkgs.dev.azure.com/dummy/_packaging/DummyApps/npm/registry/
{
  body: `{"$id":"1","innerException":null,"message":"TF400813: The user 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}`
} HTTPClient failed to fetch https://pkgs.dev.azure.com/dummy/_packaging/DummyApps/npm/registry/chromatic, got 401/Unauthorized
Could not retrieve package info from registry; skipping update check
Error: HTTPClient failed to fetch https://pkgs.dev.azure.com/dummy/_packaging/DummyApps/npm/registry/chromatic, got 401/Unauthorized

As we are using NX and we run Chromatic on all affected libraries. The CI-pipeline gets this message about xx times in the logs.

Implemented option "--skipUpdateCheck" in: #928