Timeline for Handle specific error in bash
Current License: CC BY-SA 4.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 30, 2019 at 7:08 | vote | accept | Dmitry Pavlushin | ||
| Apr 28, 2019 at 19:43 | answer | added | user313992 | timeline score: 1 | |
| Apr 28, 2019 at 18:10 | review | Close votes | |||
| Apr 30, 2019 at 4:09 | |||||
| Apr 28, 2019 at 18:05 | answer | added | Freddy | timeline score: 3 | |
| Apr 28, 2019 at 17:18 | comment | added | Dmitry Pavlushin | @Scott yeah, you are right, but the failure of containing script/CI pipeline/etc is not really important to my question, I just need to "substitute" command return code from 1 to 0 if some specific text appears in stdout. CI pipeline stuff is just provided for context | |
| Apr 28, 2019 at 17:16 | comment | added | Dmitry Pavlushin | @JeffSchaller no, I can omit version and just live with error: 409 already contains version | |
| Apr 28, 2019 at 17:15 | comment | added | Jeff Schaller♦ | I just noticed a specific version number in there; should the output require 1.2.3 or be flexible with any version number? Please edit the question to specify; thank you! | |
| Apr 28, 2019 at 17:14 | comment | added | Dmitry Pavlushin | @JeffSchaller I did not check error code on other cases when error happens, but I can assume that it is always 1, so I have to handle code 1 in combination with this specific output/ | |
| Apr 28, 2019 at 17:12 | history | edited | Jeff Schaller♦ | edited tags | |
| Apr 28, 2019 at 17:12 | comment | added | Jeff Schaller♦ | Is it the combination of the output and the exit status=1 that you need, or can you ignore every exit status of 1? | |
| Apr 28, 2019 at 17:05 | comment | added | Scott - Слава Україні | My point is that a non-zero exit code doesn’t cause a whole script to fail unless you have done set -e (or you are testing the code and explicitly exiting). So, no, you haven’t really answered my question “How does it fail?” | |
| Apr 28, 2019 at 17:04 | answer | added | AcId | timeline score: 0 | |
| Apr 28, 2019 at 16:21 | comment | added | Dmitry Pavlushin | @Scott I just replaced CI pipeline with script to be more general, is that fine to you? | |
| Apr 28, 2019 at 16:20 | history | edited | Dmitry Pavlushin | CC BY-SA 4.0 | deleted 3 characters in body |
| Apr 28, 2019 at 16:14 | comment | added | Scott - Слава Україні | What pipeline? How does it fail? … … … … … … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete. | |
| Apr 28, 2019 at 16:10 | review | First posts | |||
| Apr 28, 2019 at 16:15 | |||||
| Apr 28, 2019 at 16:08 | history | asked | Dmitry Pavlushin | CC BY-SA 4.0 |