From d6c5e054c27d7318f11cfe2dc9bbb75a1f78762a Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Mon, 30 Mar 2015 09:26:51 -0500 Subject: [PATCH] (GH-207) pass switches correctly Only pass a switch if it is specified --- .../infrastructure.app/services/PowershellService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chocolatey/infrastructure.app/services/PowershellService.cs b/src/chocolatey/infrastructure.app/services/PowershellService.cs index 364df4ac3a..ef4f79aa9d 100644 --- a/src/chocolatey/infrastructure.app/services/PowershellService.cs +++ b/src/chocolatey/infrastructure.app/services/PowershellService.cs @@ -110,12 +110,12 @@ public string wrap_script_with_module(string script, ChocolateyConfiguration con private string get_script_arguments(string script, ChocolateyConfiguration config) { - return "-packageScript '{0}' -installArguments '{1}' -forceX86 {2} -packageParameters '{3}' -overrideArgs {4}".format_with( + return "-packageScript '{0}' -installArguments '{1}' -packageParameters '{2}'{3}{4}".format_with( script, config.InstallArguments, - config.ForceX86 ? "$true" : "$false", config.PackageParameters, - config.OverrideArguments ? "$true" : "$false" + config.ForceX86 ? " -forceX86" : string.Empty, + config.OverrideArguments ? " -overrideArgs" : string.Empty ); }