diff --git a/chaos/experiments/main.sh b/chaos/experiments/main.sh index 33c3a31d7..59d229c3b 100755 --- a/chaos/experiments/main.sh +++ b/chaos/experiments/main.sh @@ -60,11 +60,11 @@ cleanup() { sleep 2 if [ $exit_code -eq 0 ]; then - rm instance_*.log || true - find . -type d -name "instance_*" -print0 | xargs -0 rm -rf || true + rm instance_*.log 2>/dev/null || true + find . -type d -name "instance_*" -print0 | xargs -0 rm -rf 2>/dev/null || true fi - rm -rf tmp_rocks_* || true - find . -type d -name "tmp_rocks_*" -print0 | xargs -0 rm -rf || true + rm -rf tmp_rocks_* 2>/dev/null || true + find . -type d -name "tmp_rocks_*" -print0 | xargs -0 rm -rf 2>/dev/null || true echo "Job is done. With exit code $exit_code" } trap cleanup EXIT INT TERM