Skip to content

Commit

Permalink
(GH-1517) Fix: Given path's format is not supported
Browse files Browse the repository at this point in the history
When setting output directory, if you do it in the proper manner as
suggested by the documentation, it will return an error with "The given
path's format is not supported." This is because the option is not
removing the surrounding quotes like the other options do.

Allow passing `--outputdirectory="'c:\somepath'"` in the proper manner
so that it matches consistency with all of the other options.
  • Loading branch information
ferventcoder committed Mar 23, 2018
1 parent 44b30d0 commit 4e09b18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon
option => configuration.NewCommand.AutomaticPackage = option != null)
.Add("t=|template=|template-name=",
"TemplateName - Use a named template in {0}\\templates\\templatename instead of built-in template. Available in 0.9.9.9+. Manage templates as packages in 0.9.10+.".format_with(ApplicationParameters.InstallLocation),
option => configuration.NewCommand.TemplateName = option)
option => configuration.NewCommand.TemplateName = option.remove_surrounding_quotes())
.Add("name=",
"Name [Required]- the name of the package. Can be passed as first parameter without \"--name=\".",
option =>
Expand All @@ -61,7 +61,7 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon
option => configuration.NewCommand.TemplateProperties.Add(TemplateValues.MaintainerPropertyName, option.remove_surrounding_quotes()))
.Add("out=|outdir=|outputdirectory=|output-directory=",
"OutputDirectory - Specifies the directory for the created Chocolatey package file. If not specified, uses the current directory. Available in 0.9.10+.",
option => configuration.OutputDirectory = option)
option => configuration.OutputDirectory = option.remove_surrounding_quotes())
.Add("built-in|built-in-template|originaltemplate|original-template|use-original-template|use-built-in-template",
"BuiltInTemplate - Use the original built-in template instead of any override. Available in 0.9.10+.",
option => configuration.NewCommand.UseOriginalTemplate = option != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon
option => configuration.Version = option.remove_surrounding_quotes())
.Add("out=|outdir=|outputdirectory=|output-directory=",
"OutputDirectory - Specifies the directory for the created Chocolatey package file. If not specified, uses the current directory.",
option => configuration.OutputDirectory = option)
option => configuration.OutputDirectory = option.remove_surrounding_quotes())
;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon
optionSet
.Add("s=|source=",
"Source - The source to find the package(s) to install. Special sources include: ruby, webpi, cygwin, windowsfeatures, and python. Defaults to default feeds.",
option => configuration.Sources = option)
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("version=",
"Version - A specific version to uninstall. Defaults to unspecified.",
option => configuration.Version = option.remove_surrounding_quotes())
Expand Down

0 comments on commit 4e09b18

Please sign in to comment.