1
0
Fork 0
mirror of synced 2024-12-13 10:55:46 -05:00

Set exit status when running a command from enter

This commit is contained in:
Tim Byrne 2019-12-16 08:36:48 -06:00
parent 2978c7dd8a
commit 7ad28c3a97
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12

7
yadm
View file

@ -939,8 +939,13 @@ function enter() {
yadm_prompt="yadm shell ($YADM_REPO) $shell_path > " yadm_prompt="yadm shell ($YADM_REPO) $shell_path > "
PROMPT="$yadm_prompt" PS1="$yadm_prompt" "$SHELL" $shell_opts "${shell_cmd[@]}" PROMPT="$yadm_prompt" PS1="$yadm_prompt" "$SHELL" $shell_opts "${shell_cmd[@]}"
return_code="$?"
[ "${#shell_cmd[@]}" -eq 0 ] && echo "Leaving yadm repo" if [ "${#shell_cmd[@]}" -eq 0 ]; then
echo "Leaving yadm repo"
else
exit_with_hook "$return_code"
fi
} }
function git_command() { function git_command() {