Skip to content

Commit fb87f25

Browse files
authored
Merge pull request #33609 from storybookjs/norbert/fix-onboarding-cli-added-parts
CLI: Fix onboarding not opening
2 parents 6818f34 + 26dfe51 commit fb87f25

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

code/lib/create-storybook/src/initiate.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ async function runStorybookDev(result: {
182182
parts.push('--silent');
183183
}
184184

185+
// in the case of Angular, we are calling `ng run` which doesn't allow passing flags to the command
185186
const supportSbFlags = projectType !== ProjectType.ANGULAR;
186187

187188
if (supportSbFlags) {
188189
// npm needs extra -- to pass flags to the command
189-
// in the case of Angular, we are calling `ng run` which doesn't need the extra `--`
190190
const doesNeedExtraDash =
191191
packageManager.type === PackageManagerName.NPM ||
192192
packageManager.type === PackageManagerName.BUN;
@@ -201,13 +201,13 @@ async function runStorybookDev(result: {
201201

202202
if (useAlternativePort) {
203203
parts.push(`-p`, `${availablePort}`);
204+
}
204205

205-
if (supportsOnboarding && shouldOnboard) {
206-
parts.push('--initial-path=/onboarding');
207-
}
208-
209-
parts.push('--quiet');
206+
if (supportsOnboarding && shouldOnboard) {
207+
parts.push('--initial-path=/onboarding');
210208
}
209+
210+
parts.push('--quiet');
211211
}
212212

213213
// instead of calling 'dev' automatically, we spawn a subprocess so that it gets

0 commit comments

Comments
 (0)