Skip to content

Commit

Permalink
(GH-510) Fix: args for new fail with param=value
Browse files Browse the repository at this point in the history
Some installers, MSIs in particular, specify silent arguments as
PROPERTY=value. Attempting to pass that in with
`choco new silentargs="/qn /norestart PROPERTY=value` will cause
choco to pass an empty string value in place of the passed arguments.

Fix the behavior to do the right thing when splitting the property
settings so that `=` can be passed as part of the arguments.
  • Loading branch information
sahebjade authored and ferventcoder committed Jan 28, 2016
1 parent 049a278 commit c390f8c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void handle_additional_argument_parsing(IList<string> unparsedArguments,

foreach (var unparsedArgument in unparsedArguments.or_empty_list_if_null())
{
var property = unparsedArgument.Split(new[] {'='}, StringSplitOptions.RemoveEmptyEntries);
var property = unparsedArgument.Split(new[] { '=' }, 2, StringSplitOptions.RemoveEmptyEntries);
if (property.Count() == 2)
{
var propName = property[0].trim_safe();
Expand Down

0 comments on commit c390f8c

Please sign in to comment.