[anyterm] anyterm-cmd: Don't ignore errors.

abo abo at fedoraproject.org
Fri Jun 1 22:18:44 UTC 2012


commit 12cda7f4bb773dd7f0e7b701ad85db0a829e99af
Author: Alexander Boström <abo at root.snowtree.se>
Date:   Tue May 22 12:25:46 2012 +0200

    anyterm-cmd: Don't ignore errors.

 anyterm-cmd |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/anyterm-cmd b/anyterm-cmd
index 248acec..c511d68 100644
--- a/anyterm-cmd
+++ b/anyterm-cmd
@@ -3,13 +3,15 @@
 # Simply prompt the user for a username and 
 # ssh locally as that user
 
+set -eo pipefail
+
 while : ; do
     echo -n "Username: "
     read U
     # Make sure it does not start with a "-" and only contains valid
     # username characters.
     if [[ "$U" =~ ^[A-Za-z0-9_][A-Za-z0-9_-]*$ ]]; then
-      ssh "$U at localhost"
+      ssh "$U at localhost" || :
     else
       echo "Bad username."
     fi


More information about the scm-commits mailing list