Skip to content

Commit

Permalink
Merge pull request #18969 from storybookjs/generate-repros-next-init-yes
Browse files Browse the repository at this point in the history
CLI: auto-accept migrations when running `generate-repros-next`
  • Loading branch information
yannbf authored Aug 20, 2022
2 parents 857c533 + 33f48fd commit afb1a56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/lib/cli/src/initiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export async function initiate(options: CommandOptions, pkg: Package): Promise<v
packageManager.installDependencies();
}

await automigrate({ yes: process.env.CI === 'true' });
await automigrate({ yes: options.yes || process.env.CI === 'true' });

logger.log('\nTo run your Storybook, type:\n');
codeLog([packageManager.getRunStorybookCommand()]);
Expand Down
2 changes: 1 addition & 1 deletion scripts/next-repro-generators/generate-repros.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const sbInit = async (cwd: string) => {
const sbCliBinaryPath = join(__dirname, `../../code/lib/cli/bin/index.js`);
console.log(`🎁 Installing storybook`);
const env = { STORYBOOK_DISABLE_TELEMETRY: 'true' };
await runCommand(`${sbCliBinaryPath} init`, { cwd, env });
await runCommand(`${sbCliBinaryPath} init --yes`, { cwd, env });
};

const LOCAL_REGISTRY_URL = 'http://localhost:6000';
Expand Down

0 comments on commit afb1a56

Please sign in to comment.