Merge pull request #25914 from Unity-Technologies/feature/add-choco-package-args

Added package arguments to chocolatey install
This commit is contained in:
Thomas S Hatch 2015-07-31 14:20:32 -06:00
commit 8a7e365649

View File

@ -334,7 +334,8 @@ def install(name,
force=False,
install_args=None,
override_args=False,
force_x86=False):
force_x86=False,
package_args=None):
'''
Instructs Chocolatey to install a package.
@ -363,6 +364,9 @@ def install(name,
force_x86
Force x86 (32bit) installation on 64 bit systems. Defaults to false.
package_args
A list of arguments you want to pass to the package
CLI Example:
.. code-block:: bash
@ -386,6 +390,8 @@ def install(name,
cmd.extend(['-OverrideArguments'])
if force_x86:
cmd.extend(['-forcex86'])
if package_args:
cmd.extend(['-PackageParameters', package_args])
cmd.extend(_yes())
result = __salt__['cmd.run_all'](cmd, python_shell=False)