diff --git a/main.go b/main.go index c515105..1d13f77 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,6 @@ import ( "time" "github.com/joho/godotenv" - _ "github.com/joho/godotenv/autoload" "github.com/urfave/cli/v2" ) @@ -22,6 +21,10 @@ func main() { _ = godotenv.Load(filename) } + if _, err := os.Stat("/run/drone/env"); err == nil { + _ = godotenv.Overload("/run/drone/env") + } + app := cli.NewApp() app.Name = "Drone Lambda" app.Usage = "Deploying Lambda code with drone CI to an existing function"