diff --git a/dev/ci/teardown-sccache b/dev/ci/teardown-sccache index 0ecedebb32..cff70a47bd 100755 --- a/dev/ci/teardown-sccache +++ b/dev/ci/teardown-sccache @@ -10,10 +10,12 @@ set -x # teardown-sccache can still be called even when setup-sccache fails, so don't # assume that sccache is in PATH and also don't assume that the log file exists. -if $SUDO; then - sudo /usr/local/bin/sccache --stop-server -else - /usr/local/bin/sccache --stop-server +if [[ -e /usr/local/bin/sccache ]]; then + if $SUDO; then + sudo /usr/local/bin/sccache --stop-server + else + /usr/local/bin/sccache --stop-server + fi fi if test -e sccache.log; then