bash script says success even though the command failed
A cleanup script keeps reporting success in CI but the files are still there. Debian 12, script starts with set -e and does find /tmp/builds -name '*.log' piped into xargs rm -f. The find part fails sometimes because the directory doesn't exist on fresh runners, but the script exits 0 and the CI step goes green. I thought set -e caught everything. Why doesn't it?
4 replies