diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index c94160f0d65d..96759086aa20 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -182,11 +182,11 @@ async function runStorybookDev(result: { parts.push('--silent'); } + // in the case of Angular, we are calling `ng run` which doesn't allow passing flags to the command const supportSbFlags = projectType !== ProjectType.ANGULAR; if (supportSbFlags) { // npm needs extra -- to pass flags to the command - // in the case of Angular, we are calling `ng run` which doesn't need the extra `--` const doesNeedExtraDash = packageManager.type === PackageManagerName.NPM || packageManager.type === PackageManagerName.BUN; @@ -201,13 +201,13 @@ async function runStorybookDev(result: { if (useAlternativePort) { parts.push(`-p`, `${availablePort}`); + } - if (supportsOnboarding && shouldOnboard) { - parts.push('--initial-path=/onboarding'); - } - - parts.push('--quiet'); + if (supportsOnboarding && shouldOnboard) { + parts.push('--initial-path=/onboarding'); } + + parts.push('--quiet'); } // instead of calling 'dev' automatically, we spawn a subprocess so that it gets