Skip to content

Commit 87e3b01

Browse files
remove unnecessary public check
1 parent 0904874 commit 87e3b01

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

  • packages/cloudflare/src/cli/commands

packages/cloudflare/src/cli/commands/init.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,10 @@ async function initCommand(): Promise<void> {
5353
}
5454

5555
printStepTitle("Creating _headers in public folder");
56-
if (!fs.existsSync("public")) {
57-
fs.mkdirSync("public");
58-
}
5956
if (fs.existsSync("public/_headers")) {
6057
logger.warn("⚠️ public/_headers file already exists\n");
6158
} else {
62-
cpSync(`${getPackageTemplatesDirPath()}/_headers`, "public/_headers");
59+
cpSync(`${getPackageTemplatesDirPath()}/_headers`, "public/_headers", { recursive: true });
6360
}
6461

6562
printStepTitle("Updating package.json scripts");

0 commit comments

Comments
 (0)