Skip to content

Commit 42251f0

Browse files
nicoespeonSimon Renoult
authored andcommitted
fix: use compatible option for uniq
"uniq --count" doesn't exist on my machine (macOS v10.15.3, Catalina) "uniq -c" is less explicit, but it seems more compatible. Ideally, we would use a lib that would do an abstraction of the OS, so this can run on any system (e.g. Windows).
1 parent db21c4c commit 42251f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/count-commits-per-file.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ function buildCommand(directory, { firstParent, since }): string {
6666
"'*.[tj]s'"
6767
].join(" "),
6868
"sort",
69-
"uniq --count"
69+
// --count might not be supported by all OS
70+
"uniq -c"
7071
].join(" | ");
7172
}
7273

0 commit comments

Comments
 (0)