Commit 020076ab authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Ignore no-email flag in dev mode

parent 08a24643
...@@ -220,11 +220,13 @@ func configure(cmd *cobra.Command) error { ...@@ -220,11 +220,13 @@ func configure(cmd *cobra.Command) error {
Production: viper.GetBool("production"), Production: viper.GetBool("production"),
} }
if !viper.GetBool("no-email") && conf.Email == "" { if conf.Production {
return errors.New("In production mode it is required to specify either an email address with the --email flag, or explicitly opting out with --no-email. See help or README for more info.") if !viper.GetBool("no-email") && conf.Email == "" {
} return errors.New("In production mode it is required to specify either an email address with the --email flag, or explicitly opting out with --no-email. See help or README for more info.")
if viper.GetBool("no-email") && conf.Email != "" { }
return errors.New("--no-email cannot be combined with --email") if viper.GetBool("no-email") && conf.Email != "" {
return errors.New("--no-email cannot be combined with --email")
}
} }
// Handle requestors // Handle requestors
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment