Adding silent flag to npm.bootstrap

This commit is contained in:
Derek Schaller 2016-01-14 21:06:21 -08:00 committed by Justin Findlay
parent 30e03a8b0c
commit 354c0bdf26

View File

@ -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)