You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that parser picks out '--' variable but then concatenates the nuspec file name and key=val as if the combined string was the complete path to nuspec file.
I'm going to close this issue but maybe someone needs to take a look at it later and/or handle errors better.
It turned out that nuspec had the following string for version "1.1.x". When launched 'pack' like this: choco pack filename.nuspec the first error it presented was about lack of $src$ substitution. When I provided substitution to $src$ and $bin$ the error should have been that XML Element "version" was invalid. Instead it was presenting error with strangely concatenated nuspec name.
Bottom line there is a bug but it's in error handling when XML element value is not valid.
What You Are Seeing?
In my nuspec I have variables:
It looks like this:
What is Expected?
Running this:
choco pack filename.nuspec
Generates error:
However this:
choco pack filename.nuspec src="testpath"
Generates error:
Adding any other flag between nuspec file name and parameter does not change the error. For example:
choco pack filename.nuspec --version 0.0.3 src="testpath"
generates the same error.
Note that parser picks out '--' variable but then concatenates the nuspec file name and key=val as if the combined string was the complete path to nuspec file.
Output Log
SourceType='normal'|Debug='True'|Verbose='False'|Trace='False'|
Force='False'|Noop='False'|HelpRequested='False'|
UnsuccessfulParsing='False'|RegularOutput='True'|QuietOutput='False'|
PromptForConfirmation='False'|AcceptLicense='False'|
AllowUnofficialBuild='False'|
Input='filename.nuspec src=testpath'|Version='0.0.3'|
AllVersions='False'|SkipPackageInstallProvider='False'|
Prerelease='False'|ForceX86='False'|OverrideArguments='False'|
NotSilent='False'|ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='6.3.9600.0'|
Information.PlatformName='Windows Server 2012 R2'|
Information.ChocolateyVersion='0.10.5.0'|
Information.ChocolateyProductVersion='0.10.5'|
Information.FullName='choco, Version=0.10.5.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.IsUserAdministrator='True'|
Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|Information.LicenseType='Foss'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.ScriptsCheckLastExitCode='False'|
ListCommand.LocalOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'|
ListCommand.Exact='False'|ListCommand.ByIdOnly='False'|
ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'|
ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
FeatureCommand.Command='unknown'|
ConfigCommand.Command='unknown'|PinCommand.Command='unknown'|
Proxy.BypassOnLocal='True'|
_ Chocolatey:ChocolateyPackCommand - Normal Run Mode _
Chocolatey had an error occur:
System.ArgumentException: File specified is either not found or not a .nuspec file. 'clientreporting-service.nuspec src=
testpath'
at chocolatey.infrastructure.app.services.NugetService.<>c__DisplayClass23.<validate_and_return_package_file>b__22(St
ring name, String value)
at chocolatey.infrastructure.guards.Ensure
1.meets(Func
2 ensureFunction, Action`2 exceptionAction)at chocolatey.infrastructure.app.services.NugetService.validate_and_return_package_file(ChocolateyConfiguration confi
g, String extension)
at chocolatey.infrastructure.app.services.NugetService.pack_run(ChocolateyConfiguration config)
at chocolatey.infrastructure.app.services.ChocolateyPackageService.pack_run(ChocolateyConfiguration config)
at chocolatey.infrastructure.app.runners.GenericRunner.run(ChocolateyConfiguration config, Container container, Boole
an isConsole, Action`1 parseArgs)
at chocolatey.infrastructure.app.runners.ConsoleApplication.run(String[] args, ChocolateyConfiguration config, Contai
ner container)
at chocolatey.console.Program.Main(String[] args)
The text was updated successfully, but these errors were encountered: