File tree Expand file tree Collapse file tree 1 file changed +0
-10
lines changed
Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change 1- import { execSync } from "node:child_process" ;
21import { existsSync } from "node:fs" ;
32
43import 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-
3727function assertIsGitRootDirectory ( directory : string ) : void {
3828 if ( ! existsSync ( `${ directory } /.git` ) ) {
3929 throw new Error ( `Argument 'dir' must be the git root directory.` ) ;
You can’t perform that action at this time.
0 commit comments