mirror of
https://github.com/skywind3000/z.lua
synced 2026-10-31 04:54:27 +00:00
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:
1 file changed
+4
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user