-
Notifications
You must be signed in to change notification settings - Fork 905
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
choco pack command fails on non-Windows when the nupkg already exists #2076
Comments
This is a strange error. I don't think that is how it should be reacting. When it can't overwrite a file, it should be sending a different message. |
So, I've been debugging this, it's been painful to get working on Linux... The pack fails at NuGet.PackageBuilder.WriteManifest called from NuGet.PackageBuilder.Save. The issue actually comes in a few lines earlier, when System.IO.Packaging.Package.Open is called. It is called with However, the file is not getting truncated properly, so it reads in the previously existing values from current While if I run it on Windows, the file is truncated properly, and the previous existing values are discarded: Therefore, it appears like there is an issue with |
I've opened an issue with Mono, after some more testing: |
Mono does not truncate streams in System.IO.Packaging.Package.Open when using FileMode.Create, while .Net does. mono/mono#21055 This always truncates the stream at the start.
Mono does not truncate streams in System.IO.Packaging.Package.Open when using FileMode.Create, while .Net does. mono/mono#21055 This always truncates the stream at the start.
Mono does not truncate streams in System.IO.Packaging.Package.Open when using FileMode.Create, while .Net does. mono/mono#21055 This always truncates the stream at the start.
Mono does not truncate streams in System.IO.Packaging.Package.Open when using FileMode.Create, while .Net does. mono/mono#21055 This always truncates the stream at the start.
Mono does not truncate streams in System.IO.Packaging.Package.Open when using FileMode.Create, while .Net does. mono/mono#21055 This always truncates the stream at the start.
Mono does not truncate streams in System.IO.Packaging.Package.Open when using FileMode.Create, while .Net does. mono/mono#21055 This always truncates the stream at the start.
Mono does not truncate streams in System.IO.Packaging.Package.Open when using FileMode.Create, while .Net does. mono/mono#21055 This always truncates the stream at the start.
What You Are Seeing?
When running
choco pack
on Mono on a Linux system, it will fail to pack if the.nupkg
already exists.What is Expected?
That
choco pack
will work even if the.nupkg
already exists.How Did You Get This To Happen? (Steps to Reproduce)
choco
on Mono on Linux.choco pack
twice on that package source.Output Log
Full Log Output
Important bits
Full log from two runs, the first one works fine, the second run fails
The text was updated successfully, but these errors were encountered: