mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-13 02:23:51 +00:00
if dotenv file does not exist, do not load it
This commit is contained in:
parent
39fa0ef810
commit
bd895149ad
|
@ -320,8 +320,10 @@ func run(cmd *cobra.Command, args []string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := godotenv.Load(dotenvFile); err != nil {
|
if _, err := os.Stat(dotenvFile) ; err == nil {
|
||||||
return errors.Wrap(err, "error loading dotenv file")
|
if err := godotenv.Load(dotenvFile); err != nil {
|
||||||
|
return errors.Wrap(err, "error loading dotenv file")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user