mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Adding ability to disable npm install silent flag
This commit is contained in:
parent
8b336dc1b4
commit
428b53e647
@ -65,7 +65,8 @@ def install(pkg=None,
|
||||
dir=None,
|
||||
runas=None,
|
||||
registry=None,
|
||||
env=None):
|
||||
env=None,
|
||||
silent=True):
|
||||
'''
|
||||
Install an NPM package.
|
||||
|
||||
@ -101,6 +102,11 @@ def install(pkg=None,
|
||||
|
||||
.. versionadded:: 2014.7.0
|
||||
|
||||
silent
|
||||
Wether or not to run NPM install with --silent flag.
|
||||
|
||||
.. versionadded::2015.9.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
@ -120,8 +126,10 @@ def install(pkg=None,
|
||||
pkgs = pkg_list
|
||||
if registry:
|
||||
registry = _cmd_quote(registry)
|
||||
|
||||
cmd = ['npm', 'install', '--silent', '--json']
|
||||
cmd = ['npm', 'install']
|
||||
if silent:
|
||||
cmd.append(['--silent'])
|
||||
cmd.append(['--json'])
|
||||
|
||||
if dir is None:
|
||||
cmd.append(' --global')
|
||||
|
Loading…
Reference in New Issue
Block a user