mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Adding silent flag to npm.bootstrap
This commit is contained in:
parent
30e03a8b0c
commit
354c0bdf26
@ -261,7 +261,8 @@ def removed(name,
|
||||
|
||||
|
||||
def bootstrap(name,
|
||||
user=None):
|
||||
user=None,
|
||||
silent=True):
|
||||
'''
|
||||
Bootstraps a node.js application.
|
||||
|
||||
@ -276,7 +277,7 @@ def bootstrap(name,
|
||||
|
||||
if __opts__['test']:
|
||||
try:
|
||||
call = __salt__['npm.install'](dir=name, runas=user, pkg=None, dry_run=True)
|
||||
call = __salt__['npm.install'](dir=name, runas=user, pkg=None, silent=silent, dry_run=True)
|
||||
except (CommandNotFoundError, CommandExecutionError) as err:
|
||||
ret['result'] = False
|
||||
ret['comment'] = 'Error Bootstrapping {0!r}: {1}'.format(name, err)
|
||||
@ -287,7 +288,7 @@ def bootstrap(name,
|
||||
return ret
|
||||
|
||||
try:
|
||||
call = __salt__['npm.install'](dir=name, runas=user, pkg=None)
|
||||
call = __salt__['npm.install'](dir=name, runas=user, pkg=None, , silent=silent)
|
||||
except (CommandNotFoundError, CommandExecutionError) as err:
|
||||
ret['result'] = False
|
||||
ret['comment'] = 'Error Bootstrapping {0!r}: {1}'.format(name, err)
|
||||
|
Loading…
Reference in New Issue
Block a user