Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-OutputDirectory is not work #173

Closed
Claud opened this issue Mar 17, 2015 · 2 comments
Closed

-OutputDirectory is not work #173

Claud opened this issue Mar 17, 2015 · 2 comments

Comments

@Claud
Copy link

Claud commented Mar 17, 2015

Hello. All my scripts for building packages is broken.

Why you change build commands?!!!

https://github.com/Claud/chocolatey-packages/blob/master/winscp/src/1-build-package.bat
https://github.com/Claud/chocolatey-packages/blob/master/winscp/src/3-push-package.bat

@gep13
Copy link
Member

gep13 commented Mar 17, 2015

Hello Claud,

Sorry to hear that you are having issues with the new release of Chocolatey. To be clear though, the cpack command never had a -OutputDirectory switch, as you can see documented here:

https://github.com/chocolatey/chocolatey/wiki/CommandsPack

The reason that this worked for you is that cpack was simply a light wrapper around the nuget pack command, which does have an -OutputDirectory switch, as documented here:

https://docs.nuget.org/consume/command-line-reference#update-command-options

I can't speak to whether it was intended to provide this functionality in Chocolatey < 0.9.8.33. Looking at the source code:

https://github.com/chocolatey/chocolatey/blob/master/src/functions/Chocolatey-Pack.ps1

It seems clear that the intention was only for the packageName, i.e. the nuspec file, to be passed through, not the additional arguments for the underlying nuget pack command.

Now that Chocolatey > 0.9.9.0 uses the Nuget Core Dll, rather than direct calls to nuget.exe, your additional parameters are not being respected. However, this is very much an edge case of usage, so I am not sure what can be done.

To correct your scripts, you would need to simply use nuget pack rather than cpack, and it should work as it used to.

@ferventcoder
Copy link
Member

Okay, originally this was not an issue because it was using behavior we never implemented. However #598 was just filed to ask for this behavior, so I will leave that open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants