Made packages.config path configurable from NuGet preferences by popara96 · Pull Request #551 · GlitchEnzo/NuGetForUnity (original) (raw)
Minor changes in order to make packages.config path configurable. We don't allow for the path to be outside of Assets folder since we still need OnPostprocessAllAssets to be triggered if this file is changed.
…the user manually entered an invalid path in NuGet.config file
Comment on lines +46 to +47
| relativeTo = Path.GetFullPath(relativeTo); |
|---|
| path = Path.GetFullPath(path); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should probably only accept full paths and not call GetFullPath on them. If someone passed relative paths to it this would not work correctly if called from CLI version since CurrentDirectory and project path set through the argument could be different. We could throw or return path if Path.IsPathRooted returned false for any of them.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CLI can use Directory.SetCurrentDirectory(projectPath); to get the same behavior.
…nfig file's directory by default
…fig file path is outside of Assets instead of logging
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for that much changes. Together we are getting a nice solution. 👍
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we can merge 👍
popara96 deleted the configurable-config-path branch
Thank you for the thorough review @JoC0de !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})