Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fcannizzaro committed Jun 23, 2017
1 parent 59e9704 commit 0446e4f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions npm-install.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ def npmls(file, p):
if file not in root:
out = subprocess.check_output(['npm', 'root'], cwd=p, shell=True)
out = out.decode().strip()
if not path.exists(out): return []
root[file] = out
return listdir(root[file])
try:
return listdir(root[file])
except Exception:
return []

def cwd(view):
project = re.match(r'(.*)[\/\\].*', view.file_name())
Expand Down

0 comments on commit 0446e4f

Please sign in to comment.