Skip to content

Commit

Permalink
Fix - Correctly map --env flag
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneharter committed Dec 10, 2021
1 parent 4f67dfa commit e800789
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func init() {
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.
RootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", cfgFile, "Config file")
RootCmd.PersistentFlags().StringVar(&environment, "env", apiKey, "Cronitor Environment")
RootCmd.PersistentFlags().StringVar(&environment, "env", environment, "Cronitor Environment")
RootCmd.PersistentFlags().StringVarP(&apiKey, "api-key", "k", apiKey, "Cronitor API Key")
RootCmd.PersistentFlags().StringVarP(&pingApiKey, "ping-api-key", "p", pingApiKey, "Ping API Key")
RootCmd.PersistentFlags().StringVarP(&hostname, "hostname", "n", hostname, "A unique identifier for this host (default: system hostname)")
Expand Down

0 comments on commit e800789

Please sign in to comment.