mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
Use fs.promises.rm
to remove node deprecation warning (#5119)
This commit is contained in:
parent
ff2c34553b
commit
430e0346c9
2 changed files with 6 additions and 1 deletions
5
.changeset/eight-swans-divide.md
Normal file
5
.changeset/eight-swans-divide.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use `fs.promises.rm` to remove node deprecation warning
|
|
@ -270,7 +270,7 @@ async function cleanSsrOutput(opts: StaticBuildOptions) {
|
||||||
const url = new URL(filename, out);
|
const url = new URL(filename, out);
|
||||||
const folder = await fs.promises.readdir(url);
|
const folder = await fs.promises.readdir(url);
|
||||||
if (!folder.length) {
|
if (!folder.length) {
|
||||||
await fs.promises.rmdir(url, { recursive: true });
|
await fs.promises.rm(url, { recursive: true, force: true });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue