Skip to content

Commit

Permalink
TWO_FA_CONFIG env
Browse files Browse the repository at this point in the history
  • Loading branch information
egeneralov committed Sep 1, 2020
1 parent 6a44f56 commit 5f5af71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ func main() {
if err != nil {
panic(err)
}
configFilePath = home + "/.2faconfig.yaml"

configFilePath = os.Getenv("TWO_FA_CONFIG")
if configFilePath == "" {
configFilePath = home + "/.2faconfig.yaml"
}

flag.StringVar(&configFilePath, "config", configFilePath, "path to secret file")
flag.Parse()
Expand Down

0 comments on commit 5f5af71

Please sign in to comment.