You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In https://trac.sagemath.org/ticket/34623 we observed that error in one command are ignored and Gitpod just continues to execute the following commands.
What you're saying about error handling is true, it's upto the bash shell.
However, in your example snippet, you have exit 1, which will exit the task shell itself. So it's not an appropriate example. I believe you wanted to express the fact that commands within a task which are run inside a bash shell do not halt on errors status. This would showcase what you wanted to:
tasks:
- name: Dependencies & Database
init: |
(exit 1)
echo "Got here, should not have"
Notice the parentheses around exit 1. However, this is not important here, just pointing out 😄
For a solution, please check #13520, I've also added an example on our docs.
Bug description
The description of multi-line tasks in https://www.gitpod.io/docs/configure/workspaces/tasks#multi-line-tasks is incomplete and lacks a discussion of error handling.
In https://trac.sagemath.org/ticket/34623 we observed that error in one command are ignored and Gitpod just continues to execute the following commands.
The examples shown in this documentation in this section and https://www.gitpod.io/docs/configure/workspaces/tasks#wait-for-a-port-to-be-available do not promote good practices.
Steps to reproduce
Workspace affected
No response
Expected behavior
No response
Example repository
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: