Skip to content

Commit c2de1b6

Browse files
committed
🐛 Fix: change git-utils to is-git-repository
1 parent 6d70d5f commit c2de1b6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/cli.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
import chalk from 'chalk';
33
import execa from 'execa';
44
import yargs from 'yargs';
5-
import git from 'git-utils';
65
import inquirer from 'inquirer';
6+
import isGit from 'is-git-repository';
77
import updateNotifier from 'update-notifier';
88

99
import pkg from '../package.json';
1010
import getConfig from './getConfig';
1111
import { choices, questions } from './promptConfig';
1212

13-
const repository = git.open(process.cwd());
1413
const configuration = getConfig();
1514
const choicesList = choices(configuration);
1615
const questionsList = questions(choicesList);
@@ -26,7 +25,7 @@ updateNotifier({ pkg }).notify();
2625

2726
if (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) => {

0 commit comments

Comments
 (0)