diff --git a/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 b/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 index 4281f15384..c6da085631 100644 --- a/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 +++ b/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 @@ -19,6 +19,16 @@ if ($env:ChocolateyEnvironmentDebug -eq 'true') { $DebugPreference = "Continue"; $VerbosePreference = "SilentlyContinue" if ($env:ChocolateyEnvironmentVerbose -eq 'true') { $VerbosePreference = "Continue"; $verbosity = $true } +$installArguments = $env:chocolateyInstallArguments + +$overrideArgs = false +if ($env:chocolateyInstallOverride -eq 'true') { $overrideArgs = true } + +$forceX86 = false +if ($env:chocolateyForceX86 -eq 'true') { $forceX86 = true } + +$packageParameters = $env:chocolateyPackageParameters + # ensure module loading preference is on $PSModuleAutoLoadingPreference = "All"; diff --git a/src/chocolatey/infrastructure.app/services/PowershellService.cs b/src/chocolatey/infrastructure.app/services/PowershellService.cs index 23ec61ecd7..3983143630 100644 --- a/src/chocolatey/infrastructure.app/services/PowershellService.cs +++ b/src/chocolatey/infrastructure.app/services/PowershellService.cs @@ -160,8 +160,10 @@ public bool run_action(ChocolateyConfiguration configuration, PackageResult pack Environment.SetEnvironmentVariable("packageVersion", package.Version.to_string()); Environment.SetEnvironmentVariable("chocolateyPackageFolder", packageDirectory); Environment.SetEnvironmentVariable("packageFolder", packageDirectory); + Environment.SetEnvironmentVariable("installArguments", configuration.InstallArguments); Environment.SetEnvironmentVariable("installerArguments", configuration.InstallArguments); Environment.SetEnvironmentVariable("chocolateyInstallArguments", configuration.InstallArguments); + Environment.SetEnvironmentVariable("packageParameters", configuration.PackageParameters); Environment.SetEnvironmentVariable("chocolateyPackageParameters", configuration.PackageParameters); if (configuration.ForceX86) {