Skip to content

Commit

Permalink
Merge pull request ansible#7798 from koenpunt/npm-nvm-exec
Browse files Browse the repository at this point in the history
Allow npm executable to contain spaces
  • Loading branch information
jimi-c committed Jun 17, 2014
2 parents 4be33b6 + 2748095 commit b300bf4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/packaging/npm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
Expand Down

0 comments on commit b300bf4

Please sign in to comment.