Skip to content

Commit dd37d74

Browse files
Merge pull request #27 from marcial-lopezferrada-hs/master
fix empty config-dir
2 parents 79984f0 + c8bca63 commit dd37d74

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CURRENTOS := $(shell go env GOOS)
22
CURRENTARCH := $(shell go env GOARCH)
33
COMMIT := $(shell git rev-parse --short HEAD)
4-
VERSION := v1.3.4
4+
VERSION := v1.3.5
55
LDFLAGS="-X main.buildVersion=$(VERSION) -X main.commitVersion=$(COMMIT)"
66

77
.DEFAULT_GOAL := build

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func ReadConfigFile(configFile string, configDir string, inputPrefix, outputPref
175175
}
176176

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

181181
} else {

util/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func ProcessFlags(args []string) (*CliFlags, error) {
111111

112112
app.Flag("init", "Run in init mode, process templates and exit.").Default("false").BoolVar(&flags.PerformInit)
113113
app.Flag("config", "Full path of the config file to read.").Default("vault-config.yml").StringVar(&flags.ConfigFile)
114-
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)
114+
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)
115115
app.Flag("output-prefix", "Path to prefix to all output files (such as /etc/secrets)").StringVar(&flags.OutputPrefix)
116116
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)
117117
app.Flag("secret-prefix", "Vault path to prepend to secrets with relative paths").StringVar(&flags.ServiceSecretPrefix)

0 commit comments

Comments
 (0)