chocolatey-archive / chocolatey

[DEPRECATED - https://github.com/chocolatey/choco] Chocolatey NuGet - Like apt-get, but for windows.
https://chocolatey.org
Apache License 2.0
2.8k stars 344 forks source link

Silent fail when calling cpack and not running as Administrator #344

Open JogoShugh opened 11 years ago

JogoShugh commented 11 years ago

I'm not sure if this really an big deal or not, but I'm documenting it just in case. If you want me to look into it, just give me some pointers and I'll be glad to do so:

I was trying to create a new package (as documented here https://github.com/versionone/VersionOne.CloudFormation/tree/master/chocolatey), but noticed that calling cpack silently failed under one condition:

For me it resulted in:

c:\Chocolatey\chocolateytemplates\_templates\VersionOne>cpack
Calling 'C:\Chocolatey\chocolateyInstall\nuget.exe pack  -NoPackageAnalysis'.

If I use -DEBUG, I see:

c:\Chocolatey\chocolateytemplates\_templates\VersionOne>cpack -DEBUG
DEBUG: Running 'Chocolatey-Pack' for . If nuspec name is not passed, it will
find the nuspec file in the current working directory
Calling 'C:\Chocolatey\chocolateyInstall\nuget.exe pack  -NoPackageAnalysis'.

If I simply invoke cmd natively, then it all works just fine, as expected:

C:\Chocolatey\chocolateytemplates\_templates\VersionOne>cpack
Calling 'C:\Chocolatey\chocolateyInstall\nuget.exe pack  -NoPackageAnalysis'.
Attempting to build package from 'VersionOne.nuspec'.
Successfully created package 'C:\Chocolatey\chocolateytemplates\_templates\VersionOne\VersionOne.13.2.4.66.nupkg'.
ferventcoder commented 11 years ago

Interesting, so did the first command return or just sit there?

ferventcoder commented 11 years ago

Looking at this again, I wonder if there are some missing path items as you are going to cmd from bash. By the way, install the prerelease and you should be able to stay in bash and run chocolatey commands.

JogoShugh commented 11 years ago

Thanks Rob, I will give it a try. And, it does finish. It does not just sit there.