New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return an error exit status from client commands that fail #47

Merged
merged 1 commit into from Aug 22, 2015
Jump to file or symbol
Failed to load files and symbols.
+7 −1
Diff settings

Always

Just for now

Return an error exit status from client commands that fail

  • Loading branch information...
nilbus committed Nov 22, 2014
commit fee7f483fdd78e0caba4b9c6d71b295df636bdb3
Copy path View file
8 wemux
@@ -325,9 +325,10 @@ announce_connection() {
[ "$announce_attach" == "true" ] && redirect=`$wemux display-message \
"$username has attached in $connection_type mode." 2>&1`
$attach_commands
status=$?
[ "$announce_attach" == "true" ] && redirect=`$wemux display-message \
"$username has detached." 2>&1`
return 0
return $status
}
# Announces when a user joins/changes their server.
@@ -520,6 +521,7 @@ client_mode() {
$wemux attach -t $server -r
else
echo "No wemux server to mirror on '$server'."
return 126
fi
}
@@ -530,6 +532,7 @@ client_mode() {
$wemux attach -t $server
else
echo "No wemux server to pair with on '$server'."
return 126
fi
else
echo "Pair mode is disabled."
@@ -551,6 +554,7 @@ client_mode() {
$wemux attach -t $client_session
else
echo "No wemux server to go 'rogue' with on '$server'."
return 126
fi
else
echo "Rogue mode is disabled."
@@ -568,6 +572,7 @@ client_mode() {
echo "Logged out of rogue mode on '$server'."
else
echo "No wemux server to log out of on '$server'."
return 126
fi
else
echo "Rogue mode is disabled."
@@ -598,6 +603,7 @@ client_mode() {
announce_connection "mirror" $wemux attach -t $server -r
else
echo "No wemux server to attach to on '$server'"
return 126
fi
}
ProTip! Use n and p to navigate between commits in a pull request.