Skip to content

Commit

Permalink
fix storybook command in init
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Jun 21, 2023
1 parent 5021c4f commit 3f21012
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/lib/cli/src/initiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,12 @@ async function doInitiate(options: CommandOptions, pkg: PackageJson): Promise<vo
// instead of calling 'dev' automatically, we spawn a subprocess so that it gets
// executed directly in the user's project directory. This avoid potential issues
// with packages running in npxs' node_modules
packageManager.runPackageCommandSync(storybookCommand, ['--quiet'], undefined, 'inherit');
packageManager.runPackageCommandSync(
storybookCommand.replace(/yarn|pnpm|npm/, ''),
['--quiet'],
undefined,
'inherit'
);
} catch (e) {
const isCtrlC =
e.message.includes('Command failed with exit code 129') &&
Expand Down

0 comments on commit 3f21012

Please sign in to comment.