Can't run help command without configuraiton
When I don't have a config.toml
present anywhere in my system and I try to run autoscaler custom --help
it doesn't show the help information but shows an error, which is not ideal when someone it trying to understand what commands are trying to do.
steve steve-mbp-gitlab … autoscaler 14-add-documentation-for-autoscaler 1✎ 4+ $ ./build/autoscaler custom --help 09:21:02
hook failure: couldn't read configuration file "config.toml": open config.toml: no such file or directory
NAME:
autoscaler - Autoscaling driver for GitLab Runner
USAGE:
autoscaler [global options] command [command options] [arguments...]
VERSION:
dev (1651de3)
AUTHOR:
GitLab Inc. <support@gitlab.com>
COMMANDS:
custom, c Bindings to GitLab Runner's Custom Executor
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--debug Set debug log level
--log-level value Set custom log level (debug, info, warning, error, fatal, panic)
--log-file value File where logs should be saved
--log-format value Format of log (text, json)
--config value Path to configuration file (default: "config.toml")
--help, -h show help
--version, -v print the version
ERRO[2020-01-03T09:21:07+01:00] Application execution failed PID=71979 error="hook failure: couldn't read configuration file \"config.toml\": open config.toml: no such file or directory"
panic: Runner Adapter not initialized. Must call runner.InitAdapter() first!
goroutine 1 [running]:
gitlab.com/gitlab-org/ci-cd/custom-executor-drivers/autoscaler/internal/runner.GetAdapter(...)
/Users/steve/Code/gitlab.com/gitlab-org/ci-cd/custom-executor-drivers/autoscaler/internal/runner/adapter.go:148
main.main()
/Users/steve/Code/gitlab.com/gitlab-org/ci-cd/custom-executor-drivers/autoscaler/cmd/autoscaler/main.go:57 +0x1b0