Skip to content

Commit

Permalink
fix: fix missing return for exec function
Browse files Browse the repository at this point in the history
  • Loading branch information
osdevisnot committed Jan 2, 2020
1 parent 98ddab0 commit 8987b87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const trim = str => str.replace(/^\s|\s$/, '');

const exec = cmd => {
try {
trim(execSync(cmd, { stdio: ['ignore', 'pipe', 'ignore'] }).toString());
return trim(
execSync(cmd, { stdio: ['ignore', 'pipe', 'ignore'] }).toString()
);
} catch {
return false;
}
Expand Down

0 comments on commit 8987b87

Please sign in to comment.