diff options
author | thefourtheye <thechargingvolcano@gmail.com> | 2015-05-05 20:23:56 +0300 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2015-05-07 19:42:08 +0300 |
commit | b97b96d05a05429f5eccf1588f183a925fbececa (patch) | |
tree | ee632dcea2718d632920eac7036a9273cb58f687 /tools/install.py | |
parent | c43855c49cb7ef7b4ae46749e9f89ab5376de09a (diff) |
install: fix NameError
If `len(args)` is less than two, then
`install_path = dst_dir + node_prefix + '/'` would throw a `NameError`,
because `dst_dir` will not be defined yet. So we are assigning `''` as
the default value.
PR-URL: https://github.com/iojs/io.js/pull/1628
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'tools/install.py')
-rwxr-xr-x | tools/install.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/install.py b/tools/install.py index a14e89426c6..8d76a14860d 100755 --- a/tools/install.py +++ b/tools/install.py @@ -198,8 +198,8 @@ def run(args): # argv[2] is a custom install prefix for packagers (think DESTDIR) # argv[3] is a custom install prefix (think PREFIX) # Difference is that dst_dir won't be included in shebang lines etc. - if len(args) > 2: - dst_dir = args[2] + dst_dir = args[2] if len(args) > 2 else '' + if len(args) > 3: node_prefix = args[3] |