Skip to content

Commit c698823

Browse files
committed
Rename PFTQ_CONFIG env var to PFTQCONFIG
1 parent cb50ae9 commit c698823

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,8 @@ $ PFTQ_REDIS_ADDR=... pftaskqueue ...
713713
### Config file
714714

715715
`pftaskqueue` automatically reads `${HOME}/.pftaskqueue.yaml` if exists.
716-
Or, you can also set any configuration path with `--config=${CONFIG_FILE_PATH}` flag or `PFTQ_CONFIG` environment variable.
717-
`--config` flag is prioritized over `PFTQ_CONFIG` environment variable.
716+
Or, you can also set any configuration path with `--config=${CONFIG_FILE_PATH}` flag or `PFTQCONFIG` environment variable.
717+
`--config` flag is prioritized over `PFTQCONFIG` environment variable.
718718

719719
To generate config file with default values, please run `print-default-config` command.
720720

cmd/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func init() {
144144

145145
rootCmd.SetVersionTemplate(VersionString())
146146
flag := rootCmd.PersistentFlags()
147-
flag.StringVar(&cfgFile, "config", "", "config file path. [default = $PFTQ_CONFIG or $HOME/.pftaskqueue.yaml]")
147+
flag.StringVar(&cfgFile, "config", "", "config file path. [default = $PFTQCONFIG or $HOME/.pftaskqueue.yaml]")
148148
flag.BoolVar(&displayOpts, "display-options", false, "display loaded config values at startup")
149149

150150
// Log setting
@@ -239,7 +239,7 @@ func initConfig() {
239239
if cfgFile != "" {
240240
// Use config file from the flag.
241241
viper.SetConfigFile(cfgFile)
242-
} else if env, ok := os.LookupEnv("PFTQ_CONFIG"); ok {
242+
} else if env, ok := os.LookupEnv("PFTQCONFIG"); ok {
243243
// Use config file from env var.
244244
viper.SetConfigFile(env)
245245
} else {

0 commit comments

Comments
 (0)