summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joseph Lozano <me@josephlozano.xyz> 2022-08-17 03:47:38 -0400
committerGravatar GitHub <noreply@github.com> 2022-08-17 15:47:38 +0800
commitaa5118e8543bb9ed240681acdabfcc09bdbb5438 (patch)
tree9a697ec99587430d3d40cdb1905c6914a9090944
parent1de82f0f7805965124922ffd2cef6fb5e1b55527 (diff)
downloadastro-aa5118e8543bb9ed240681acdabfcc09bdbb5438.tar.gz
astro-aa5118e8543bb9ed240681acdabfcc09bdbb5438.tar.zst
astro-aa5118e8543bb9ed240681acdabfcc09bdbb5438.zip
Fallback to undefined rather than false when resolving CLI flags (#4362)
-rw-r--r--.changeset/few-mayflies-invent.md5
-rw-r--r--packages/astro/src/core/config.ts2
2 files changed, 6 insertions, 1 deletions
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<Flags>): 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,
};
}