mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
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
This commit is contained in:
parent
22955b895c
commit
bf024cb342
2 changed files with 6 additions and 1 deletions
5
.changeset/forty-dodos-dress.md
Normal file
5
.changeset/forty-dodos-dress.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
don't finish the action of the copy before removing all files.
|
|
@ -343,7 +343,7 @@ async function cleanServerOutput(opts: StaticBuildOptions) {
|
||||||
// Clean out directly if the outDir is outside of root
|
// Clean out directly if the outDir is outside of root
|
||||||
if (out.toString() !== opts.settings.config.outDir.toString()) {
|
if (out.toString() !== opts.settings.config.outDir.toString()) {
|
||||||
// Copy assets before cleaning directory if outside root
|
// 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 });
|
await fs.promises.rm(out, { recursive: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue