From 0eeb25348ea43d90d91336cc8540c821f7390d4f Mon Sep 17 00:00:00 2001 From: Merrick Christensen Date: Fri, 1 Oct 2021 11:18:40 -0600 Subject: [PATCH] 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 --- .changeset/odd-owls-clean.md | 5 +++++ packages/create-astro/src/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/odd-owls-clean.md diff --git a/.changeset/odd-owls-clean.md b/.changeset/odd-owls-clean.md new file mode 100644 index 000000000..674830e0c --- /dev/null +++ b/.changeset/odd-owls-clean.md @@ -0,0 +1,5 @@ +--- +'create-astro': patch +--- + +change rm to unlink for node 12 compatability diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index fc6c63a2d..aa2cf7c5a 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -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; }