fix: use correct flag in dockerfile (#18)

Update the Dockerfile entrypoint script to use the correct version flag
syntax. The flag now requires two dashes instead of one. The syntax for
the texfile collector has also change, and the script was updated
accordingly.
Fix incorrect order of variable assignment when parsing CLI flags.
This commit is contained in:
Hector
2022-01-31 22:51:13 +00:00
parent 98d376ac60
commit 93da909b0a
2 changed files with 13 additions and 12 deletions

View File

@ -81,6 +81,8 @@ func readParamsFromCli(settings *AppSettings) {
Envar(basicAuthPassEnvName).
String()
kingpin.Parse()
settings.VersionMode = *versionMode
settings.MetricsPort = *port
settings.MetricsAddress = *address
@ -88,8 +90,6 @@ func readParamsFromCli(settings *AppSettings) {
settings.FileCollectorEnabled = *fileCollectorEnabled
settings.FileCollectorPath = *fileCollectorPath
settings.setBasicAuthValues(*rawBasicAuthUsername, *rawBasicAuthPassword)
kingpin.Parse()
}
func (settings *AppSettings) setBasicAuthValues(rawUsername, rawPassword string) {