-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
buildinfo parser: handle version strings from Go dev builds
With the various possible version strings in play, trying to parse this line is a bit haphazard. We really only need to extract the executable path, so I've switched to using a regex. That comes at a cost of less semantic error returns, but as it happens we weren't receiving these error lines anyway.. they are printed to stderr, and we only capture stdout from `go version -m ...`. There is the option to capture stderr as well, but in a way only dealing with stdout makes life easier as there is less of a chance we mishandle an error line, etc. The `verifyExtracted` function already picks up on any paths not parsed from the output - I've adjusted the error handling slightly so it's more obvious what has caused the issue. Resolves #10
- Loading branch information
Nicholas Jones
committed
Aug 20, 2021
1 parent
12863f4
commit 0688ce1
Showing
3 changed files
with
39 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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