mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-05-09 18:23:21 +08:00
chore: load env from /run/drone/env path
This commit is contained in:
parent
b447da961e
commit
1d89d2d875
5
main.go
5
main.go
@ -18,6 +18,11 @@ func main() {
|
||||
if filename, found := os.LookupEnv("PLUGIN_ENV_FILE"); found {
|
||||
_ = godotenv.Load(filename)
|
||||
}
|
||||
|
||||
if _, err := os.Stat("/run/drone/env"); err == nil {
|
||||
godotenv.Overload("/run/drone/env")
|
||||
}
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "Drone SSH"
|
||||
app.Usage = "Executing remote ssh commands"
|
||||
|
Loading…
Reference in New Issue
Block a user