Skip to content

Example task fails #9

@briceburg

Description

@briceburg

The current full example task fails as /bin/sh -c only accepts a single argument.

The current example

override-container-command: |  /bin/sh  -c  php artisan migrate --force --ansi && \  php artisan db:seed --force --ansi && \  php artisan config:clear --ansi

will produce an ecs run-task equivalent of:

 aws ecs run-task ... \ --overrides '{ "containerOverrides": [ { "name": "foo", "command": ["/bin/sh", "-c", "php artisan migrate --force --ansi && \\", "php artisan db:seed --force --ansi && \\", "php artisan config:clear --ansi"] } ] }'

which executes the first argument (artisan migrate), but produces line 0 errors on the other commands.

It would be great to support a shell command helper that merges the [multiline] commands into a single argument (when they trail with a \?). For now, I think we must do everything on a single line, e.g.

override-container-command: |  /bin/sh  -c  php artisan migrate --force --ansi && php artisan db:seed --force --ansi && php artisan config:clear --ansi

and should update the example?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions