Improve TOML error reporting by including line numbers
Description
A customer encountered an error in their config.toml
when installing with the --user
flag:
gitlab-runner install --user=gitlab-runner
Runtime platform arch=amd64 os=linux pid=56174 revision=f188edd7 version=14.9.1
FATAL: toml: cannot load TOML value of type map[string]interface {} into a Go string
Since the specific line number isn't logged, this can make it tedious to troubleshoot exactly what's wrong in the config.toml
.
Reference ticket: US Federal Ticket (Internal access to verified US Citizens only)
Proposal
TOML package has the ability to log the specific line and column of the error using ErrorWithLocation()
.
Links to related issues and merge requests / references
Edited by David Coy