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

[Bug]: Packing a NUSPEC results in different behavior depending on the type of slash used #11234

Open
jeffkl opened this issue Sep 15, 2021 · 2 comments
Labels

Comments

@jeffkl
Copy link
Contributor

jeffkl commented Sep 15, 2021

NuGet Product Used

NuGet.exe

Product Version

All

Worked before?

No response

Impact

No response

Repro Steps & Context

With the following directory structure:

foo\bar\file.txt

You will get different behavior with these two nuspecs:

Back slash

.nuspec

<files>
  <files src="foo\bar\**" target="tools" />
</files>

Result:

tools\file.txt

Forward slash

.nuspec

<files>
  <files src="foo/bar/**" target="tools" />
</files>

Result:

tools\foo\bar\file.txt

This was regressed here: https://github.com/NuGet/NuGet.Client/pull/3634/files#diff-c01d3caec0c8d4f43277fdc62db8f461cfa430fdadfd6f92d46804dfbe666c20R1107

And reported here: #11125

We'll revert the breaking behavior and figure out if there's a way to fix the behavior without it being a breaking change.

Verbose Logs

No response

@jeffkl
Copy link
Contributor Author

jeffkl commented Sep 17, 2021

Some more details here, the behavior changed on Windows between version 5.9 and 5.10:

version content/* /content/** content\* content\**
5.8.1 error tools\content\file.txt tools\file.txt tools\file.txt
5.9.1 error tools\content\file.txt tools\file.txt tools\file.txt
5.10.0 tools\file.txt tools\file.txt tools\file.txt tools\file.txt
5.11.0 tools\file.txt tools\file.txt tools\file.txt tools\file.txt
FUTURE tools\content\file.txt tools\content\file.txt tools\content\file.txt tools\content\file.txt
FUTURE tools\content\sub\file.txt tools\content\sub\file.txt

Add option to get old behavior back with something like flatten="true"

@rbleattler
Copy link

How on earth is this still an open issue... This was documented years ago by the community. It should at least have a footnote in the documentation...

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

No branches or pull requests

4 participants