From 1f533040da4555521f3d22910abc2efc68be1dc9 Mon Sep 17 00:00:00 2001 From: Kyal Lanum <48729516+kyallanum@users.noreply.github.com> Date: Sun, 31 Dec 2023 16:12:31 -0700 Subject: [PATCH] Fixed Cobra not pulling environment variables. --- cmd/root.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index b03a3fa..0f44303 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -59,8 +59,8 @@ func Execute() error { } func init() { - rootCmd.Flags().StringVarP(&configFile, "config", "c", os.Getenv(""), "") - rootCmd.Flags().StringVarP(&logFile, "log-file", "l", os.Getenv(""), "") + rootCmd.Flags().StringVarP(&configFile, "config", "c", os.Getenv("ATHENA_CONFIG_FILE"), "") + rootCmd.Flags().StringVarP(&logFile, "log-file", "l", os.Getenv("ATHENA_LOG_FILE"), "") } func resolveLogFile(contents *logs.LogFile, configuration *config.Configuration) (*library.Library, error) {