This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
The parsePackageParameters function allows you to call choco install like this: | |
choco install MyChocolateyPackage --params '/myParam: ""some parameter with spaces in it""' | |
#> | |
function parsePackageParameters($packageParameters) { | |
$arguments = @{} | |
if ($packageParameters) { | |
# The input string is something like this, and we will use a Regular Expression to parse the values | |
# /Port:81 /Edition:LicenseKey /AdditionalTools |