Re: Unexpected "recover" from non-existing tramp-login-program
Tim Landscheidt <[email protected]>
| Newsgroups | gmane.emacs.tramp |
|---|---|
| Organization | https://www.tim-landscheidt.de/ |
| Message-ID | <[email protected]> |
Michael Albinus <[email protected]> wrote: >> while working with docker-tramp 0.1.1 and not setting >> docker-tramp-docker-executable correctly on a Fedora system, > First of all, docker-tramp from M(?)ELPA is deprecated. Since Tramp 2.6 > (Eamcs 29), Tramp has an own implementation for docker containers. > This offers also the method "podman" which you might need on Fedora. I tend to stick with distribution packages which for Fedo- ra 38 means Emacs 28.3. docker-tramp works very nicely with that and covers all of my needs. > […] >> I have not debugged where this behaviour is rooted and >> whether it can be "fixed" easily, but if TRAMP can detect >> that the call to tramp-login-program fails, it would be nice >> if it could croak. > Well, we could do something like this. Does this work for you? > diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el > index 38925652..1301cd63 100644 > --- a/lisp/tramp-sh.el > +++ b/lisp/tramp-sh.el > @@ -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. Yes, this gives a clear error indication. Thanks! Tim