refactor: set default environment variables format in plugin (#253)

- Add `INPUT_ENVS_FORMAT` to the list of environment variables in `main.go`
- Define `envsFormat` variable in `plugin.go`
- Add default value for `Config.EnvsFormat` in `plugin.go` `Exec()` function

fix https://github.com/appleboy/drone-ssh/pull/235
This commit is contained in:
Bo-Yi Wu
2023-04-13 09:32:31 +08:00
committed by GitHub
parent 6464d9999f
commit 49542638c6
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -199,8 +199,8 @@ func main() {
&cli.StringFlag{
Name: "envs.format",
Usage: "",
EnvVars: []string{"PLUGIN_ENVS_FORMAT"},
Value: "export {NAME}={VALUE}",
EnvVars: []string{"PLUGIN_ENVS_FORMAT", "INPUT_ENVS_FORMAT"},
Value: envsFormat,
},
}