mirror of
https://github.com/drone/drone-cli.git
synced 2026-01-20 09:51:34 +01:00
Merge pull request #107 from dschmidt/drone-exec-params
Fix drone exec params
This commit is contained in:
commit
bde5a2254f
@ -46,7 +46,7 @@ func getEnv(c *cli.Context) map[string]string {
|
||||
func prefixedEnviron(environ []string) map[string]string {
|
||||
envs := map[string]string{}
|
||||
for _, env := range environ {
|
||||
if !strings.HasSuffix(env, "DRONE_") {
|
||||
if !strings.HasPrefix(env, "DRONE_") {
|
||||
continue
|
||||
}
|
||||
parts := strings.SplitN(env, "=", 2)
|
||||
|
||||
@ -85,7 +85,11 @@ var Command = cli.Command{
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "secret-file",
|
||||
Usage: "secret file",
|
||||
Usage: "secret file, define values that can be used with from_secret",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "env-file",
|
||||
Usage: "env file",
|
||||
},
|
||||
cli.StringSliceFlag{
|
||||
Name: "privileged",
|
||||
@ -251,7 +255,7 @@ func exec(c *cli.Context) error {
|
||||
transform.WithProxy(),
|
||||
transform.WithSecrets(
|
||||
readParams(
|
||||
c.String("env-file"),
|
||||
c.String("secret-file"),
|
||||
),
|
||||
),
|
||||
transform.WithVolumes(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user