-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tasks: Fail on error by default (run with bash -e
)
#13558
Comments
bash -e
)bash -e
)
bash -e
)bash -e
)
I guess it could be alright to run like that in prebuild workspaces, but in regular workspaces it will close a terminal on first errored statement. |
@akosyakov is it possible leave terminal open with a message that the task it terminated, listing failed step and instructions how to continue or restart the task? That would be in ideal UX. |
Have you tried to create a shell script and do |
@akosyakov I can move everything into separate script, wrap into |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is not completed. |
Is your feature request related to a problem? Please describe
Gitpod multiline tasks don't fail if the failed command is in the middle (#13520).
For example, this inevitable failure will result in great success.
Which is equivalent to this
bash
call.https://github.com/gitpod-io/website/pull/2843 adds an explanation with a code snippet that users need to copy paste if they want to amend this behavior and fail on errors. The problem is, all other CI/CD systems that are configured by YAML, such as GitHub Actions, fail on multiline strings by default.
Describe the behaviour you'd like
The solution is to add
-e
option tobash
when task is executed. Then the execution will be equal to this behavior.The example at the https://github.com/gitpod-io/website/pull/2843 then could be altered to show how modify scripts to ignore failures.
The text was updated successfully, but these errors were encountered: