switch from rm to unlink in order to preserve node 12 compatability in astro-create (#1468)

* switch from rm to unlink in order to preserve node 12 compatability in astro-create

* add changeset
This commit is contained in:
Merrick Christensen 2021-10-01 11:18:40 -06:00 committed by GitHub
parent f351bb8570
commit 0eeb25348e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'create-astro': patch
---
change rm to unlink for node 12 compatability

View file

@ -116,7 +116,7 @@ export async function main() {
switch (file) {
case 'CHANGELOG.md': {
if (fs.existsSync(fileLoc)) {
await fs.promises.rm(fileLoc);
await fs.promises.unlink(fileLoc);
}
break;
}