diff options
author | mjarkk <mkopenga@gmail.com> | 2021-07-27 22:03:37 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-10-16 12:22:34 +1100 |
commit | 913a2fd0656c393e743686cf6fe823a963916463 (patch) | |
tree | 6ee4b1edb5a90a18a21790a5aa0d9e03d2eec5b6 /main.go | |
parent | db736896bc2f10f45f8dbb0fcaccdda2490f32d5 (diff) |
Allow having multiple config files
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -61,6 +61,9 @@ func main() { gitDir := "" flaggy.String(&gitDir, "g", "git-dir", "equivalent of the --git-dir git argument") + customConfig := "" + flaggy.String(&customConfig, "cf", "config-file", "Comma seperated list to custom config file(s)") + flaggy.Parse() if repoPath != "" { @@ -72,6 +75,10 @@ func main() { gitDir = filepath.Join(repoPath, ".git") } + if customConfig != "" { + os.Setenv("LG_CONFIG_FILE", customConfig) + } + if useConfigDir != "" { os.Setenv("CONFIG_DIR", useConfigDir) } |