fix env vars (#206)

This commit is contained in:
JT Olio 2018-08-08 11:49:23 -06:00 committed by Philip Hutchins
parent c77d1b7f0b
commit fb77287325

View File

@ -8,6 +8,7 @@ import (
"flag"
"log"
"os"
"strings"
"sync"
"github.com/spf13/cobra"
@ -106,6 +107,7 @@ func cleanup(cmd *cobra.Command) {
return err
}
vip.SetEnvPrefix("storj")
vip.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_"))
vip.AutomaticEnv()
cfgFlag := cmd.Flags().Lookup("config")