diff --git a/CHANGELOG.md b/CHANGELOG.md index ff55f40..b87d92d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ BREAKING CHANGES: FEATURES: * Enhancement - Add switch to force x86 when packages have both versions - [#365](https://github.com/chocolatey/chocolatey/issues/365) + * Enhancement - Allow passing parameters to packages - [#159](https://github.com/chocolatey/chocolatey/issues/159) IMPROVEMENTS: diff --git a/nuget/chocolatey.nuspec b/nuget/chocolatey.nuspec index f7c9e19..c34ad8d 100644 --- a/nuget/chocolatey.nuspec +++ b/nuget/chocolatey.nuspec @@ -32,6 +32,7 @@ BREAKING CHANGES: FEATURES: * Enhancement - Add switch to force x86 when packages have both versions - [#365](https://github.com/chocolatey/chocolatey/issues/365) + * Enhancement - Allow passing parameters to packages - [#159](https://github.com/chocolatey/chocolatey/issues/159) IMPROVEMENTS: diff --git a/src/chocolatey.ps1 b/src/chocolatey.ps1 index ad5285d..168671e 100644 --- a/src/chocolatey.ps1 +++ b/src/chocolatey.ps1 @@ -15,6 +15,7 @@ [string] $name, [switch] $ignoreDependencies = $false, [alias("x86")][switch] $forceX86 = $false, + [alias("params")][alias("parameters")][alias("pkgParams")][hashtable]$packageParameters = @{}, [parameter(Position=1, ValueFromRemainingArguments=$true)] [string[]]$packageNames=@('') ) @@ -114,7 +115,7 @@ if ([Environment]::OSVersion.Version -lt (new-object 'Version' 6,0)){ #main entry point Append-Log -Write-Debug "Arguments: `$command = '$command'|`$packageNames='$packageNames'|`$source='$source'|`$version='$version'|`$allVersions=$allVersions|`$InstallArguments='$installArguments'|`$overrideArguments=$overrideArgs|`$force=$force|`$prerelease=$prerelease|`$localonly=$localonly|`$verbosity=$verbosity|`$debug=$debug|`$name='$name'|`$ignoreDependencies=$ignoreDependencies|`$forceX86=$forceX86" +Write-Debug "Arguments: `$command = '$command'|`$packageNames='$packageNames'|`$source='$source'|`$version='$version'|`$allVersions=$allVersions|`$InstallArguments='$installArguments'|`$overrideArguments=$overrideArgs|`$force=$force|`$prerelease=$prerelease|`$localonly=$localonly|`$verbosity=$verbosity|`$debug=$debug|`$name='$name'|`$ignoreDependencies=$ignoreDependencies|`$forceX86=$forceX86|`$packageParameters='$($packageParameters.GetEnumerator() | % {"$($_.Name)=$($_.Value)"})'" # run level environment variables $env:chocolateyForceX86 = $null @@ -122,6 +123,7 @@ if ($forceX86) { $env:chocolateyForceX86 = $true } +$env:chocolateyPackageParameters = $packageParameters $chocolateyErrored = $false $badPackages = ''