Skip to content

Commit

Permalink
(GH-60) warn when setting pin to list
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Feb 4, 2015
1 parent 27319d4 commit edf22cf
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,15 @@ public void handle_additional_argument_parsing(IList<string> unparsedArguments,
}

var command = PinCommandType.unknown;
Enum.TryParse(unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(), true, out command);

if (command == PinCommandType.unknown) command = PinCommandType.list;
string unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault();
Enum.TryParse(unparsedCommand, true, out command);

if (command == PinCommandType.unknown)
{
this.Log().Warn("Unkown command {0}. Setting to list.".format_with(unparsedCommand));

This comment has been minimized.

Copy link
@gep13

gep13 Feb 4, 2015

Member

@ferventcoder slight typo here. Unkown should be Unknown.

This comment has been minimized.

Copy link
@ferventcoder

ferventcoder Feb 6, 2015

Author Member

just fixed... will push.

This comment has been minimized.

Copy link
@ferventcoder

ferventcoder Feb 6, 2015

Author Member

Fixed in fa17107

command = PinCommandType.list;
}

configuration.PinCommand.Command = command;
configuration.Sources = ApplicationParameters.PackagesLocation;
configuration.ListCommand.LocalOnly = true;
Expand Down

0 comments on commit edf22cf

Please sign in to comment.