diff options
author | 2023-03-16 01:53:10 +0800 | |
---|---|---|
committer | 2023-03-15 13:53:10 -0400 | |
commit | bf024cb3429c5929d98378108230bc946a376b17 (patch) | |
tree | c93103d625cb3d80f39d5b697b4f633d50018d0f | |
parent | 22955b895ce4343e282355db64b3a5c1415f3944 (diff) | |
download | astro-bf024cb3429c5929d98378108230bc946a376b17.tar.gz astro-bf024cb3429c5929d98378108230bc946a376b17.tar.zst astro-bf024cb3429c5929d98378108230bc946a376b17.zip |
It even starts to remove a file before it finish it. (#6472)
* dont finish the action of the copy before removing all files.
* change name
-rw-r--r-- | .changeset/forty-dodos-dress.md | 5 | ||||
-rw-r--r-- | packages/astro/src/core/build/static-build.ts | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/forty-dodos-dress.md b/.changeset/forty-dodos-dress.md new file mode 100644 index 000000000..8876c3460 --- /dev/null +++ b/.changeset/forty-dodos-dress.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +don't finish the action of the copy before removing all files. diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index dae67b439..e65d1bea5 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -343,7 +343,7 @@ async function cleanServerOutput(opts: StaticBuildOptions) { // Clean out directly if the outDir is outside of root if (out.toString() !== opts.settings.config.outDir.toString()) { // Copy assets before cleaning directory if outside root - copyFiles(out, opts.settings.config.outDir); + await copyFiles(out, opts.settings.config.outDir); await fs.promises.rm(out, { recursive: true }); return; } |