I have a script in GitLab CI but one command sometimes ends with exit code 101 what is OK in my use case and I want to ignore it.
I would use true:
failing_script || true
But it will ignore all exit codes, so I will not be notified when there will be some other error.
I would need something like this:
failing_script || (true only if exit code 101)
This seems to be what you're looking for:
failing_script|| [ $? -eq 101 ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With