Trim whitespace/newlines when parsing addons #66
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR There was a LF/CRLF issue when parsing addons.make
The first time I tried this, instead of seeing the message about local addons, I got the warning about missing addons for both my standard & local addons. I thought this could've been because I opened the gui, then changed my OF path, and maybe it didn't rescan the addons folder? But even after relaunching the gui with the OF path already set I was still seeing it.
I ran the pg from the command line with the same paths to make sure that worked, and that looked good:
Then when going back to the gui I saw it was showing the correct warning:
When I
git diff
onaddons.make
there are no content changes but there's a notice on line-endings:Sure enough, if I clear the changes to
addons.make
the gui went back to saying the addons were missing. So I just added atrim()
on the strings.