From e800789673dd7f49703b6a0161e4e8e6f03a07c1 Mon Sep 17 00:00:00 2001 From: Shane Harter Date: Fri, 10 Dec 2021 13:53:30 -0800 Subject: [PATCH] Fix - Correctly map --env flag --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index b623d00..a750ac6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -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)")