From 0ea2cf77ddcc64a0bec36db80a52ebace91a1a4f Mon Sep 17 00:00:00 2001 From: Jeppe Toustrup Date: Wed, 18 Feb 2015 16:43:56 +0100 Subject: [PATCH] NPM: Expand the path before accessing it --- lib/ansible/modules/extras/packaging/language/npm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/extras/packaging/language/npm.py b/lib/ansible/modules/extras/packaging/language/npm.py index 1dd2e998492..8407589116a 100644 --- a/lib/ansible/modules/extras/packaging/language/npm.py +++ b/lib/ansible/modules/extras/packaging/language/npm.py @@ -149,6 +149,7 @@ 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):