Skip to content

Commit 6670ba0

Browse files
fix: await copying of files in create command (#1461)
1 parent c72600a commit 6670ba0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/curvy-eggs-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"preact-cli": patch
3+
---
4+
5+
fix: await copying of files in create command

packages/cli/lib/commands/create.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,12 @@ module.exports = async function (repo, dest, argv) {
345345
join('..', 'resources', 'template.html')
346346
);
347347
const templateDest = join(sourceDirectory, 'template.html');
348-
copyFileToDestination(templateSrc, templateDest);
348+
await copyFileToDestination(templateSrc, templateDest);
349349

350350
// Copy over sw.js
351351
const serviceWorkerSrc = resolve(__dirname, join('..', '..', 'sw', 'sw.js'));
352352
const serviceWorkerDest = join(sourceDirectory, 'sw.js');
353-
copyFileToDestination(serviceWorkerSrc, serviceWorkerDest);
353+
await copyFileToDestination(serviceWorkerSrc, serviceWorkerDest);
354354

355355
if (argv.install) {
356356
spinner.text = 'Installing dependencies:\n';

0 commit comments

Comments
 (0)