From ee0358892def5f127a9cfbdd1576803a0cb9b1e0 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 1 Jul 2020 16:45:55 +0800 Subject: [PATCH] chore: support for kubernetes runner (#96) Signed-off-by: Bo-Yi Wu --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index d77d5cb..ab2322a 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,7 @@ var ( func main() { // Load env-file if it exists first if filename, found := os.LookupEnv("PLUGIN_ENV_FILE"); found { - _ = godotenv.Load(filename) + godotenv.Load(filename) } app := cli.NewApp() @@ -251,6 +251,10 @@ func main() { }, } + if _, err := os.Stat("/run/drone/env"); err == nil { + godotenv.Overload("/run/drone/env") + } + if err := app.Run(os.Args); err != nil { log.Fatal(err) }