From aa5118e8543bb9ed240681acdabfcc09bdbb5438 Mon Sep 17 00:00:00 2001 From: Joseph Lozano Date: Wed, 17 Aug 2022 03:47:38 -0400 Subject: [PATCH] Fallback to undefined rather than false when resolving CLI flags (#4362) --- .changeset/few-mayflies-invent.md | 5 +++++ packages/astro/src/core/config.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/few-mayflies-invent.md diff --git a/.changeset/few-mayflies-invent.md b/.changeset/few-mayflies-invent.md new file mode 100644 index 000000000..4df57c2dc --- /dev/null +++ b/.changeset/few-mayflies-invent.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Allow user config to set `markdown.drafts` option diff --git a/packages/astro/src/core/config.ts b/packages/astro/src/core/config.ts index b0678de04..094680721 100644 --- a/packages/astro/src/core/config.ts +++ b/packages/astro/src/core/config.ts @@ -363,7 +363,7 @@ function resolveFlags(flags: Partial): CLIFlags { config: typeof flags.config === 'string' ? flags.config : undefined, host: typeof flags.host === 'string' || typeof flags.host === 'boolean' ? flags.host : undefined, - drafts: typeof flags.drafts === 'boolean' ? flags.drafts : false, + drafts: typeof flags.drafts === 'boolean' ? flags.drafts : undefined, }; }