Use type=path for arguments, and remove code doing the conversion (#1903)
This commit is contained in:
parent
07f8846134
commit
557d27513c
1 changed files with 2 additions and 3 deletions
|
@ -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'),
|
||||
|
|
Loading…
Reference in a new issue