Skip to content

Commit

Permalink
Merge pull request #24862 from storybookjs/norbert/test-flag-env-vari…
Browse files Browse the repository at this point in the history
…able

TestBuild: Add env-variable support to `--test` CLI-flag
  • Loading branch information
kasperpeulen authored Nov 16, 2023
2 parents 9dd8a6c + 411202f commit 4c77249
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/lib/cli/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ command('build')
configDir: 'SBCONFIG_CONFIG_DIR',
});

await build({ ...options, packageJson: pkg }).catch(() => process.exit(1));
await build({
...options,
packageJson: pkg,
test: !!options.test || process.env.SB_TESTBUILD === 'true',
}).catch(() => process.exit(1));
});

program.on('command:*', ([invalidCmd]) => {
Expand Down

0 comments on commit 4c77249

Please sign in to comment.