scripts/env: exit in case of failure to cd
authorRosen Penev <rosenp@gmail.com>
Mon, 6 Jan 2020 02:32:37 +0000 (18:32 -0800)
committerPetr Štetiar <ynezz@true.cz>
Sat, 11 Jul 2020 11:33:28 +0000 (13:33 +0200)
Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
scripts/env

index 19cfa13841969d96bb0992a1fdedb32473b26438..848850a778883a36278ee67aba3939b5d122dbc5 100755 (executable)
@@ -147,7 +147,7 @@ env_clear() {
        else
                rm -rf "$BASEDIR/files" "$BASEDIR/.config"
        fi
-       cd "$BASEDIR"
+       cd "$BASEDIR" || exit 1
        rm -rf "$ENVDIR"
 }