Skip to content

Commit

Permalink
fix(exec): fix shelljs after upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jul 31, 2017
1 parent b8d319a commit 5726e79
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/install.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

var debug = require('debug')('pre-git');
var pkg = require('../package');
console.log('%s %s in %s', pkg.name, pkg.version, process.cwd());

Expand Down Expand Up @@ -59,9 +60,13 @@ function getRootPackagePath() {
}

var exec = require('shelljs').exec;
var result = exec('git rev-parse --show-toplevel');
var cmd = 'git rev-parse --show-toplevel';
debug(cmd);
var result = exec(cmd);
if (result.code === 0) {
root = path.resolve(result.output.trim());
debug('result object');
debug(result);
root = path.resolve(result.stdout.trim());
}

//
Expand Down

0 comments on commit 5726e79

Please sign in to comment.