Skip to content

Commit 72a359b

Browse files
RamIdeaspetebacondarwin
authored andcommittedMay 17, 2023
fix: c3 should run wrangler@3

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed
 

‎packages/create-cloudflare/src/workers.ts

+12-9
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,18 @@ async function copyExistingWorkerFiles(ctx: Context) {
9696
const tempdir = await mkdtemp(
9797
join(tmpdir(), "c3-wrangler-init--from-dash-")
9898
);
99-
await runCommand(`npx wrangler init --from-dash ${ctx.existingScript} -y`, {
100-
silent: true,
101-
cwd: tempdir, // use a tempdir because we don't want all the files
102-
env: { CLOUDFLARE_ACCOUNT_ID: ctx.account?.id },
103-
startText: "Downloading existing worker files",
104-
doneText: `${brandColor("downloaded")} ${dim(
105-
`existing "${ctx.existingScript}" worker files`
106-
)}`,
107-
});
99+
await runCommand(
100+
`npx wrangler@3 init --from-dash ${ctx.existingScript} -y`,
101+
{
102+
silent: true,
103+
cwd: tempdir, // use a tempdir because we don't want all the files
104+
env: { CLOUDFLARE_ACCOUNT_ID: ctx.account?.id },
105+
startText: "Downloading existing worker files",
106+
doneText: `${brandColor("downloaded")} ${dim(
107+
`existing "${ctx.existingScript}" worker files`
108+
)}`,
109+
}
110+
);
108111

109112
// remove any src/* files from the template
110113
for (const filename of await readdir(join(ctx.project.path, "src"))) {

0 commit comments

Comments
 (0)
Please sign in to comment.