File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 22import chalk from 'chalk' ;
33import execa from 'execa' ;
44import yargs from 'yargs' ;
5- import git from 'git-utils' ;
65import inquirer from 'inquirer' ;
6+ import isGit from 'is-git-repository' ;
77import updateNotifier from 'update-notifier' ;
88
99import pkg from '../package.json' ;
1010import getConfig from './getConfig' ;
1111import { choices , questions } from './promptConfig' ;
1212
13- const repository = git . open ( process . cwd ( ) ) ;
1413const configuration = getConfig ( ) ;
1514const choicesList = choices ( configuration ) ;
1615const questionsList = questions ( choicesList ) ;
@@ -26,7 +25,7 @@ updateNotifier({ pkg }).notify();
2625
2726if ( argv . v ) {
2827 console . log ( `v${ pkg . version } ` ) ;
29- } else if ( ! repository ) {
28+ } else if ( ! isGit ( ) ) {
3029 console . error ( 'fatal: Not a git repository (or any of the parent directories): .git' ) ;
3130} else {
3231 inquirer . prompt ( questionsList ) . then ( ( answers ) => {
You can’t perform that action at this time.
0 commit comments