From e918b3883e156a0de2148517b619a2cf451917d2 Mon Sep 17 00:00:00 2001 From: Mayank <9084735+mayank99@users.noreply.github.com> Date: Wed, 10 Aug 2022 00:29:51 -0400 Subject: [PATCH] feat: Support `-y` in `astro add` (#4225) --- .changeset/two-ducks-end.md | 5 +++++ packages/astro/src/core/add/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/two-ducks-end.md diff --git a/.changeset/two-ducks-end.md b/.changeset/two-ducks-end.md new file mode 100644 index 000000000..737b992c9 --- /dev/null +++ b/.changeset/two-ducks-end.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +`astro add` now supports `-y` diff --git a/packages/astro/src/core/add/index.ts b/packages/astro/src/core/add/index.ts index d6ee73791..24025b055 100644 --- a/packages/astro/src/core/add/index.ts +++ b/packages/astro/src/core/add/index.ts @@ -701,7 +701,7 @@ function parseIntegrationName(spec: string) { } async function askToContinue({ flags }: { flags: yargs.Arguments }): Promise { - if (flags.yes) return true; + if (flags.yes || flags.y) return true; const response = await prompts({ type: 'confirm',