-
Notifications
You must be signed in to change notification settings - Fork 23
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
(GH-502) Correct path separator in nuspec file element #19
Conversation
Converts the path separator character in the nuspec file source to the character that is correct for the OS that is running the packing operation. Changes "\" to "/" on Linux and MacOS systems, and changes "/" to "\" on Windows systems. Fixes: chocolatey/choco#502
@ferventcoder Ready for a re-review |
@ferventcoder |
Here is the previous commit in choco as to why switching the seperator on Windows is needed as well: chocolatey/choco@e5a02a0 |
This has been rebased and merged here: a8e3432 I will go ahead and close out this PR. Thanks for getting this updated, appreciate it! |
For future folks looking at this PR, the issue referenced in this PR, and in the commit message, references the issue on the chocolatey/choco repository. For future PR's, we should replicate the issue in this repository, so that we can correctly hook everything up. |
When using a relative path, pack only works if the current directory is the same as the directory containing the nuspec. This switches the relative path to an absolute path for non-windows platforms (windows already uses an absolute path). This change allows pack to work from any directory. Previously, in c0b23a6 and e5a02a0, non-windows platforms were switched to using a relative path for files, so that the default files separator in the nuspec files element could be switched to a backslash (chocolatey#2166) However, the issue with forward/back slashes is fixed by chocolatey/nuget-chocolatey#19, so the previous change can now be reverted.
When using a relative path, pack only works if the current directory is the same as the directory containing the nuspec. This switches the relative path to an absolute path for non-windows platforms (windows already uses an absolute path). This change allows pack to work from any directory. Previously, in c0b23a6 and e5a02a0, non-windows platforms were switched to using a relative path for files, so that the default files separator in the nuspec files element could be switched to a backslash (chocolatey#2166) However, the issue with forward/back slashes is fixed by chocolatey/nuget-chocolatey#19, so the previous change can now be reverted.
Converts the path separator character in the nuspec file source to the
character that is correct for the OS that is running the packing
operation. Changes
"\"
to"/"
on Linux and MacOS systems, andchanges
"/"
to"\"
on Windows systems.Fixes: chocolatey/choco#502
Fixes: chocolatey/choco#2166