Skip to content

Commit a6133f4

Browse files
authored
fix(cli): --file option (#651)
1 parent 4e9a986 commit a6133f4

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.changeset/light-games-learn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"lingo.dev": patch
3+
---
4+
5+
--file option

packages/cli/src/cli/cmd/i18n.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ export default new Command()
9595
if (flags.file?.length) {
9696
buckets = buckets
9797
.map((bucket: any) => {
98-
const paths = bucket.paths.filter((path: any) => flags.file!.find((file) => path.pathPattern?.match(file)));
98+
const paths = bucket.paths.filter((path: any) =>
99+
flags.file!.find((file) => path.pathPattern?.includes(file)),
100+
);
99101
return { ...bucket, paths };
100102
})
101103
.filter((bucket: any) => bucket.paths.length > 0);

0 commit comments

Comments
 (0)