Skip to content

Commit

Permalink
remove execa dependency (#592)
Browse files Browse the repository at this point in the history
Co-authored-by: 刘祺 <gucong@gmail.com>
  • Loading branch information
typicode and gucong3000 authored Oct 12, 2019
1 parent 0c08f8d commit 7f8f09d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
36 changes: 27 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"chalk": "^2.4.2",
"ci-info": "^2.0.0",
"cosmiconfig": "^5.2.1",
"execa": "^1.0.0",
"get-stdin": "^7.0.0",
"opencollective-postinstall": "^2.0.2",
"pkg-dir": "^4.2.0",
Expand Down
5 changes: 3 additions & 2 deletions src/installer/gitRevParse.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import cp from 'child_process'
import slash from 'slash'
import execa from 'execa'

export default function(): {
topLevel: string
gitCommonDir: string
} {
// https://github.com/typicode/husky/issues/580
// https://github.com/typicode/husky/issues/587
const result = execa.sync('git', [
const result = cp.spawnSync('git', [
'rev-parse',
'--show-toplevel',
'--git-common-dir'
])

const [topLevel, gitCommonDir] = result.stdout
.toString()
.trim()
.split('\n')
// Normalize for Windows
Expand Down

0 comments on commit 7f8f09d

Please sign in to comment.