Skip to content

Commit

Permalink
Preserve --root CLI flag on restart (#6049)
Browse files Browse the repository at this point in the history
* fix(#5985): preserve `--root` CLI flag on restart

* fix: resolve --root relative to automatic root

* chore: revert container changes

* fix: pass flags.root to restart container

---------

Co-authored-by: Nate Moore <[email protected]>
  • Loading branch information
natemoo-re and natemoo-re authored Feb 9, 2023
1 parent d684524 commit 8b7cb64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tasty-planes-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Preserve `--root` CLI flag when restarting dev server
1 change: 1 addition & 0 deletions packages/astro/src/core/dev/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default async function dev(
beforeRestart: () => console.clear(),
params: {
settings,
root: options.flags?.root,
logging: options.logging,
isRestart: options.isRestart,
},
Expand Down

0 comments on commit 8b7cb64

Please sign in to comment.