[OpenWrt-Devel] [PATCH 4/5] scripts/env: exit in case of failure to cd
Rosen Penev
rosenp at gmail.com
Tue Dec 31 21:01:45 EST 2019
Found with shellcheck.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
scripts/env | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/env b/scripts/env
index 19cfa13841..848850a778 100755
--- a/scripts/env
+++ b/scripts/env
@@ -147,7 +147,7 @@ env_clear() {
else
rm -rf "$BASEDIR/files" "$BASEDIR/.config"
fi
- cd "$BASEDIR"
+ cd "$BASEDIR" || exit 1
rm -rf "$ENVDIR"
}
--
2.24.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list