scripts/env: exit in case of failure to cd

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-01-05 18:32:37 -08:00 committed by Petr Štetiar
parent e68810ba53
commit f80a540dbf

View File

@ -147,7 +147,7 @@ env_clear() {
else
rm -rf "$BASEDIR/files" "$BASEDIR/.config"
fi
cd "$BASEDIR"
cd "$BASEDIR" || exit 1
rm -rf "$ENVDIR"
}