Merge pull request #239 from HaleTom/fix-sh-wrapper-nonzero-no-match

fix(sh): return non-zero on empty target or failed jump
This commit is contained in:
Linwei authored and GitHub committed 2026-10-28 01:15:35 +08:00
commit e088f154d3
1 file changed
+4 -2
+4 -2
View File
@@ -2215,11 +2215,13 @@ _zlua() {
local zdest=$("$ZLUA_LUAEXE" "$ZLUA_SCRIPT" --cd $arg_type $arg_subdir $arg_inter "$@")
if [ -n "$zdest" ] && [ -d "$zdest" ]; then
if [ -z "$_ZL_CD" ]; then
builtin cd "$zdest"
builtin cd "$zdest" || return 1
else
$_ZL_CD "$zdest"
$_ZL_CD "$zdest" || return 1
fi
if [ -n "$_ZL_ECHO" ]; then pwd; fi
else
return 1
fi
fi
}