From 557d27513c1fe13c8430426cc07e42ffda7f7214 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 29 Apr 2016 09:57:52 +0200 Subject: [PATCH] Use type=path for arguments, and remove code doing the conversion (#1903) --- lib/ansible/modules/extras/packaging/language/npm.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/extras/packaging/language/npm.py b/lib/ansible/modules/extras/packaging/language/npm.py index b0882ddec08..53ce1e77c5e 100644 --- a/lib/ansible/modules/extras/packaging/language/npm.py +++ b/lib/ansible/modules/extras/packaging/language/npm.py @@ -154,7 +154,6 @@ class Npm(object): #If path is specified, cd into that path and run the command. cwd = None if self.path: - self.path = os.path.abspath(os.path.expanduser(self.path)) if not os.path.exists(self.path): os.makedirs(self.path) if not os.path.isdir(self.path): @@ -212,10 +211,10 @@ class Npm(object): def main(): arg_spec = dict( name=dict(default=None), - path=dict(default=None), + path=dict(default=None, type='path'), version=dict(default=None), production=dict(default='no', type='bool'), - executable=dict(default=None), + executable=dict(default=None, type='path'), registry=dict(default=None), state=dict(default='present', choices=['present', 'absent', 'latest']), ignore_scripts=dict(default=False, type='bool'),