diff --git a/code/lib/cli/src/generate.ts b/code/lib/cli/src/generate.ts index 76c00eca2d2a..e5811888521b 100644 --- a/code/lib/cli/src/generate.ts +++ b/code/lib/cli/src/generate.ts @@ -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]) => {