Skip to content

Commit

Permalink
fix: only install husky if .git folder exists
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiand391 committed Dec 1, 2021
1 parent ec8c04e commit d8f5f2b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/sf-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

const chalk = require('chalk');
const changed = require('../utils/write-dependencies')();
const exists = require('../utils/exists');

if (changed) {
const errorHeader = chalk.red('ERROR: ');
Expand All @@ -18,5 +19,7 @@ if (changed) {
} else {
require('../utils/standardize-pjson')();
require('../utils/standardize-files')();
require('../utils/husky-init')();
if (exists('.git')) {
require('../utils/husky-init')();
}
}

0 comments on commit d8f5f2b

Please sign in to comment.