Skip to content

Commit

Permalink
fix: dont copy files in .git folder
Browse files Browse the repository at this point in the history
  • Loading branch information
zanminkian committed Jan 13, 2025
1 parent 2c7a5da commit 2eb0e2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/little-ads-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rnm/tscx": patch
---

fix: dont't copy files in `.git` folder
3 changes: 2 additions & 1 deletion packages/tscx/src/cmd/copyfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export async function copyfiles(rootDirectory: string, outDirectory: string) {
if (
stat.isDirectory() &&
!filepath.startsWith(outDir) &&
!filepath.endsWith(`${path.sep}node_modules`)
!filepath.endsWith(`${path.sep}node_modules`) &&
!filepath.endsWith(`${path.sep}.git`)
) {
await walkDir(filepath, cb);
}
Expand Down

0 comments on commit 2eb0e2c

Please sign in to comment.