This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
Capture all Netkan error text after first hyphen #63
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.
Problem
The status page currently truncates error messages.
If you try to process
CareerModePartCostNullifer
manually with netkan.exe, it says:But the status page only says: 'Compression method not supported'
Cause
This line extracts everything after the final hyphen in the output:
NetKAN-bot/lib/App/KSP_CKAN/Tools/NetKAN.pm
Line 153 in 81751de
The first
.+
matches as many characters as it can, including hyphens if there are multiple. So the(.+)
part only matches the text after the last hyphen.Changes
Now the
.+
in that regex is changed to.+?
, which makes it non-greedy, so the regex's hyphen will match the first one in the output rather than the last one. This will make the(.+)
match the whole error.