Skip to content

Commit 093be8b

Browse files
committed
install: prevent a KeyError from being thrown when PORTABLE is not set
1 parent caf69aa commit 093be8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/install.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def npm_files(action):
154154
action([link_path], 'bin/npm')
155155
elif action == install:
156156
try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path)
157-
if os.environ['PORTABLE']:
157+
if os.environ.get('PORTABLE'):
158158
# This crazy hack is necessary to make the shebang execute the copy
159159
# of node relative to the same directory as the npm script. The precompiled
160160
# binary tarballs use a prefix of "/" which gets translated to "/bin/node"

0 commit comments

Comments
 (0)