Skip to content

Commit

Permalink
chore: support for kubernetes runner (#96)
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy authored Jul 1, 2020
1 parent 153fe2c commit ee03588
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit ee03588

Please sign in to comment.