Commit b300bf40 by James Cammarata

Merge pull request #7798 from koenpunt/npm-nvm-exec

Allow npm executable to contain spaces
parents 4be33b6a 2748095a
......@@ -113,9 +113,9 @@ class Npm(object):
self.production = kwargs['production']
if kwargs['executable']:
self.executable = kwargs['executable']
self.executable = kwargs['executable'].split(' ')
else:
self.executable = module.get_bin_path('npm', True)
self.executable = [module.get_bin_path('npm', True)]
if kwargs['version']:
self.name_version = self.name + '@' + self.version
......@@ -124,7 +124,7 @@ class Npm(object):
def _exec(self, args, run_in_check_mode=False, check_rc=True):
if not self.module.check_mode or (self.module.check_mode and run_in_check_mode):
cmd = [self.executable] + args
cmd = self.executable + args
if self.glbl:
cmd.append('--global')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment