Skip to content

Commit

Permalink
Merge pull request #23226 from storybookjs/fix/get-template-script
Browse files Browse the repository at this point in the history
Build: Fix get-template --debug flag
  • Loading branch information
yannbf committed Jun 27, 2023
2 parents c00af84 + dbac7d2 commit 243ca40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/get-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export async function getTemplate(
Parallelism is set to ${total}, but there are ${
potentialTemplateKeys.length
} templates to run:
} templates to run for the "${scriptName}" task:
${potentialTemplateKeys.map((v) => `- ${v}`).join('\n')}
${await getParallelismSummary(cadence)}
Expand Down Expand Up @@ -120,7 +120,7 @@ async function getParallelismSummary(cadence?: Cadence, scriptName?: string) {
type RunOptions = { cadence?: Cadence; task?: string; debug: boolean };
async function run({ cadence, task, debug }: RunOptions) {
if (debug) {
if (task && !(task in tasks)) {
if (task && !tasks.includes(task)) {
throw new Error(
dedent`The "${task}" task you provided is not valid. Valid tasks (found in .circleci/config.yml) are:
${tasks.map((v) => `- ${v}`).join('\n')}`
Expand Down

0 comments on commit 243ca40

Please sign in to comment.