Skip to content

fix(container): fail startup hooks on a non-zero command exit - #174

Open
locker95 wants to merge 1 commit into
docker:mainfrom
locker95:fix-startup-command-exit-code
Open

locker95 wants to merge 1 commit into
docker:mainfrom
locker95:fix-startup-command-exit-code

Conversation

@locker95

Copy link
Copy Markdown

WithStartupCommand and WithAfterReadyCommand only looked at the Docker exec error, so a command that exited non-zero still counted as success. The hook now returns that exit code as an error. Run fails instead of coming up with a startup command that already failed.

Fixes #155

WithStartupCommand and WithAfterReadyCommand only returned the Docker
exec error, so a command that exited non-zero still looked successful.

Signed-off-by: Dean Chen <862469039@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WithStartupCommand silently swallows non-zero exit codes from the inner command

1 participant