Skip to content

Comma in env variables causes panic #55

@jtallinger

Description

@jtallinger

Hi,

Whenever I try to use commas in the environmental variables the plugin panics. I've tried wrapping the value with " but it does not help. I've noticed the same issue in two different code projects. If I put the value in a env secret then it works fine.

  - name: deploy-production
    image: josmo/drone-ecs:latest
    ...
    settings:
      environment_variables:
        - DRONE_USER_CREATE=username:joakim,admin:true

Drone AWS ECS Plugin built

5 | panic: runtime error: index out of range [1] with length 1
6 |  
7 | goroutine 1 [running]:
8 | main.(*Plugin).Exec(0xc0000aab00, 0xc0001b2180, 0xa2208b)
9 | /go/src/github.com/tallinger/drone-ecs/plugin.go:212 +0x4155
10 | main.run(0xc0000a8420, 0x0, 0xc0000d7190)
11 | /go/src/github.com/tallinger/drone-ecs/main.go:278 +0x1347
12 | github.com/urfave/cli.HandleAction(0x962780, 0xa44bb0, 0xc0000a8420, 0xc0000a8420, 0x0)
13 | /go/pkg/mod/github.com/urfave/cli@v1.21.0/app.go:514 +0xbe
14 | github.com/urfave/cli.(*App).Run(0xc0001c2000, 0xc0000761b0, 0x1, 0x1, 0x0, 0x0)
15 | /go/pkg/mod/github.com/urfave/cli@v1.21.0/app.go:274 +0x5f6
16 | main.main()
17 | /go/src/github.com/tallinger/drone-ecs/main.go:230 +0x1ef9

Any ideas what is wrong? I had a look at row 212 in plugin.go but I do not see anything obvious wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions