mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
NPM: Expand the path before accessing it
This commit is contained in:
committed by
Matt Clay
parent
02587fba94
commit
0ea2cf77dd
@@ -149,6 +149,7 @@ class Npm(object):
|
|||||||
#If path is specified, cd into that path and run the command.
|
#If path is specified, cd into that path and run the command.
|
||||||
cwd = None
|
cwd = None
|
||||||
if self.path:
|
if self.path:
|
||||||
|
self.path = os.path.abspath(os.path.expanduser(self.path))
|
||||||
if not os.path.exists(self.path):
|
if not os.path.exists(self.path):
|
||||||
os.makedirs(self.path)
|
os.makedirs(self.path)
|
||||||
if not os.path.isdir(self.path):
|
if not os.path.isdir(self.path):
|
||||||
|
|||||||
Reference in New Issue
Block a user