Skip to content

Commit 2738ffa

Browse files
authoredSep 7, 2018
Merge pull request #25 from abetomo/fix_pathjs_error
Fix as cli failed
2 parents 847efc9 + 7b83a0e commit 2738ffa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎cli.js

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ program
2727
.option('-f, --fix', 'Attempt to fix basic standard JS issues')
2828
.option('-v, --verbose', 'Verbose mode')
2929
.action(function (cwdValue, patternArgs) {
30+
if (cwdValue == null) return
3031
// If cwd is an actual path, set it to be the cwd
3132
// Otherwise interpret it as a glob pattern
3233
if (fs.existsSync(path.resolve(cwdValue)) && fs.lstatSync(path.resolve(cwdValue)).isDirectory()) {

0 commit comments

Comments
 (0)
Please sign in to comment.