Skip to content

Commit

Permalink
Fallback to undefined rather than false when resolving CLI flags (#4362)
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-lozano committed Aug 17, 2022
1 parent 1de82f0 commit aa5118e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/few-mayflies-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Allow user config to set `markdown.drafts` option
2 changes: 1 addition & 1 deletion packages/astro/src/core/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}

Expand Down

0 comments on commit aa5118e

Please sign in to comment.