Skip to content

Commit 91d6c48

Browse files
committed
fix: remove git install assertion
It prevents some users to run the script on Windows.
1 parent 24a5cf2 commit 91d6c48

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/io/index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { execSync } from "node:child_process";
21
import { existsSync } from "node:fs";
32

43
import Cli from "./cli";
@@ -10,7 +9,6 @@ export default async function main(): Promise<void> {
109
const options = await Cli.parse();
1110

1211
warnIfUsingComplexityWithIncompatibleFileTypes(options);
13-
assertGitIsInstalled();
1412
assertIsGitRootDirectory(options.directory);
1513

1614
const statistics = await Statistics.compute(options);
@@ -26,14 +24,6 @@ function warnIfUsingComplexityWithIncompatibleFileTypes(options: Options) {
2624
}
2725
}
2826

29-
function assertGitIsInstalled(): void {
30-
try {
31-
execSync("which git");
32-
} catch (error) {
33-
throw new Error("Program 'git' must be installed");
34-
}
35-
}
36-
3727
function assertIsGitRootDirectory(directory: string): void {
3828
if (!existsSync(`${directory}/.git`)) {
3929
throw new Error(`Argument 'dir' must be the git root directory.`);

0 commit comments

Comments
 (0)