Skip to content

Commit

Permalink
fix template download check on windows (#528)
Browse files Browse the repository at this point in the history
* fix template download check on windows

* changeset
  • Loading branch information
tchalabi authored Feb 16, 2023
1 parent 061d1e1 commit 9ada30f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-ghosts-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/cli-hydrogen': patch
---

fix template download on windows
4 changes: 2 additions & 2 deletions packages/cli/src/utils/template-downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export async function downloadTarball(url: string, storageDir: string) {
filter: (name) => {
name = name.replace(storageDir, '');
return (
!name.startsWith('/templates/') ||
name.startsWith('/templates/skeleton/')
!name.startsWith(path.normalize('/templates/')) ||
name.startsWith(path.normalize('/templates/skeleton/'))
);
},
}),
Expand Down

0 comments on commit 9ada30f

Please sign in to comment.