Skip to content

Report exit code with copilot svc exec command #4317

Open
@noefroidevaux

Description

Is there a way to get the exit code from the copilot svc exec command?

Currently, it only reports 0 even it's not the case. The behaviour of ssh command would report 1 in the following case:

> ~/Project copilot svc exec
SERVICE X found in environment Y
Execute `/bin/sh` in container X in task 123.

Starting session with SessionId: ecs-execute-command-456
/app # exit 1

Exiting session with sessionId: ecs-execute-command-456.

> ~/Project echo $?
0

It's maybe linked to aws/session-manager-plugin#59 .

Is it the behaviour wanted for the copilot svc exec command? Is there a workaround to get the exit code?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area/svcIssues about services.type/enhancementIssues that are improvements for existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions