diff options
author | jramsay <jcai@gitlab.com> | 2019-11-29 19:33:59 +0300 |
---|---|---|
committer | jramsay <jcai@gitlab.com> | 2019-11-29 19:46:15 +0300 |
commit | e4cbe12182d0101175fb294900a7b8f7d238fbdc (patch) | |
tree | 4dd62b305aaaba377a434b72adbe3277d2f2d1c2 | |
parent | 5060907241e2960a18f4437f84e429a50e14d879 (diff) |
Allow praefect to be invoked like gitalyjc-praefect-config-arg-change
-rw-r--r-- | cmd/praefect/main.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/praefect/main.go b/cmd/praefect/main.go index 8fb6c0c9c..c5c882a5c 100644 --- a/cmd/praefect/main.go +++ b/cmd/praefect/main.go @@ -58,7 +58,11 @@ func configure() (config.Config, error) { var conf config.Config if *flagConfig == "" { - return conf, errNoConfigFile + if len(os.Args) < 2 { + return conf, errNoConfigFile + } + + *flagConfig = os.Args[1] } conf, err := config.FromFile(*flagConfig) |