Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjramsay <jcai@gitlab.com>2019-11-29 19:33:59 +0300
committerjramsay <jcai@gitlab.com>2019-11-29 19:46:15 +0300
commite4cbe12182d0101175fb294900a7b8f7d238fbdc (patch)
tree4dd62b305aaaba377a434b72adbe3277d2f2d1c2
parent5060907241e2960a18f4437f84e429a50e14d879 (diff)
Allow praefect to be invoked like gitalyjc-praefect-config-arg-change
-rw-r--r--cmd/praefect/main.go6
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)