From 4f328975005d022259286c87f480bfeee6bd2277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Sat, 4 Dec 2021 15:17:08 +0000 Subject: [PATCH] Parse --renderers flag correctly when passed to the create-astro cli --- .changeset/spicy-bats-search.md | 5 +++++ packages/create-astro/src/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/spicy-bats-search.md diff --git a/.changeset/spicy-bats-search.md b/.changeset/spicy-bats-search.md new file mode 100644 index 000000000000..8e6e5b3505bb --- /dev/null +++ b/.changeset/spicy-bats-search.md @@ -0,0 +1,5 @@ +--- +'create-astro': patch +--- + +Parse --renderers flag correctly when passed to the create-astro cli diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index 1334c747adf5..d4bdb78caec4 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -14,7 +14,7 @@ import { createConfig } from './config.js'; // broke our arg parser, since `--` is a special kind of flag. Filtering for `--` here // fixes the issue so that create-astro now works on all npm version. const cleanArgv = process.argv.filter((arg) => arg !== '--'); -const args = yargs(cleanArgv); +const args = yargs(cleanArgv, { array: ['renderers'] }); prompts.override(args); export function mkdirp(dir: string) {