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

Fix overriding Storybook version through environment variable #231

Merged
merged 2 commits into from Jan 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions bin/lib/getStorybookInfo.js
Expand Up @@ -68,11 +68,11 @@ const disregard = () => neverResolve;
const findViewlayer = async ({ env }) => {
// Allow setting Storybook version via CHROMATIC_STORYBOOK_VERSION='react@4.0-alpha.8' for unusual cases
if (env.CHROMATIC_STORYBOOK_VERSION) {
const [viewLayer, storybookVersion] = env.CHROMATIC_STORYBOOK_VERSION.split('@');
if (!viewLayer || !storybookVersion) {
const [viewLayer, version] = env.CHROMATIC_STORYBOOK_VERSION.split('@');
if (!viewLayer || !version) {
throw new Error('CHROMATIC_STORYBOOK_VERSION was provided but could not be used');
}
return { viewLayer, storybookVersion };
return { viewLayer, version };
}

// Try to find the Storybook viewlayer package
Expand Down