Skip to content

Commit

Permalink
Merge pull request #27 from marcial-lopezferrada-hs/master
Browse files Browse the repository at this point in the history
fix empty config-dir
  • Loading branch information
marcial-lopezferrada-hs authored Apr 12, 2022
2 parents 79984f0 + c8bca63 commit dd37d74
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CURRENTOS := $(shell go env GOOS)
CURRENTARCH := $(shell go env GOARCH)
COMMIT := $(shell git rev-parse --short HEAD)
VERSION := v1.3.4
VERSION := v1.3.5
LDFLAGS="-X main.buildVersion=$(VERSION) -X main.commitVersion=$(COMMIT)"

.DEFAULT_GOAL := build
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func ReadConfigFile(configFile string, configDir string, inputPrefix, outputPref
}

_, err = os.Stat(util.AbsolutePath(inputPrefix, configDir))
if os.IsNotExist(err) {
if configDir != "" && os.IsNotExist(err) {
zlog.Error().Err(err).Msg("config directory doesn't exist")

} else {
Expand Down
2 changes: 1 addition & 1 deletion util/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func ProcessFlags(args []string) (*CliFlags, error) {

app.Flag("init", "Run in init mode, process templates and exit.").Default("false").BoolVar(&flags.PerformInit)
app.Flag("config", "Full path of the config file to read.").Default("vault-config.yml").StringVar(&flags.ConfigFile)
app.Flag("config-dir", "Full path of the config directory to read config files. Be aware that the config version is read only once so all sub config should have the same version.").Default("config.d").StringVar(&flags.ConfigDir)
app.Flag("config-dir", "Full path of the config directory to read config files. Be aware that the config version is read only once so all sub config should have the same version.").Default("").StringVar(&flags.ConfigDir)
app.Flag("output-prefix", "Path to prefix to all output files (such as /etc/secrets)").StringVar(&flags.OutputPrefix)
app.Flag("input-prefix", "Path to prefix on all files being read; including the config file. Only the main config file (--config-file) will have his root values read. Those in the config directory will be ignored.").StringVar(&flags.InputPrefix)
app.Flag("secret-prefix", "Vault path to prepend to secrets with relative paths").StringVar(&flags.ServiceSecretPrefix)
Expand Down

0 comments on commit dd37d74

Please sign in to comment.