Handle wrong login program in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 28 Jan 2024 09:31:45 +0000 (10:31 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 28 Jan 2024 09:31:45 +0000 (10:31 +0100)
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Exit remote
shell when login fails.

lisp/net/tramp-sh.el

index 38925652376da9b541275ef6dbff91d0705784b6..1301cd633da1a8b689cab71e2c4e107fc118d429 100644 (file)
@@ -5340,7 +5340,7 @@ connection if a previous connection has died for some reason."
                            "2>" (tramp-get-remote-null-device previous-hop))
                        ?l (concat remote-shell " " extra-args " -i"))
                       ;; A restricted shell does not allow "exec".
-                      (when r-shell '("&&" "exit" "||" "exit")))
+                      (when r-shell '("&&" "exit")) '("||" "exit"))
                      " "))
 
                    ;; Send the command.