Skip to content

Commit

Permalink
(GH-207) pass switches correctly
Browse files Browse the repository at this point in the history
Only pass a switch if it is specified
  • Loading branch information
ferventcoder committed Mar 30, 2015
1 parent 45ca627 commit d6c5e05
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

Expand Down

0 comments on commit d6c5e05

Please sign in to comment.