[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unexpected "recover" from non-existing tramp-login-program
From: |
Tim Landscheidt |
Subject: |
Unexpected "recover" from non-existing tramp-login-program |
Date: |
Fri, 26 Jan 2024 14:34:17 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) |
Hi,
while working with docker-tramp 0.1.1 and not setting
docker-tramp-docker-executable correctly on a Fedora system,
I noticed this odd behaviour:
| ELISP> (add-to-list 'tramp-methods
| '("test-dne"
| (tramp-login-program "does-not-exist")
| (tramp-login-args (nil ("exec" "-it") ("-u" "%u")
("%h") ("sh")))
| (tramp-remote-shell "/bin/sh")
| (tramp-remote-shell-args ("-i" "-c"))))
| (("test-dne"
| (tramp-login-program "does-not-exist")
| (tramp-login-args
| (nil
| ("exec" "-it")
| ("-u" "%u")
| ("%h")
| ("sh")))
| (tramp-remote-shell "/bin/sh")
| (tramp-remote-shell-args
| ("-i" "-c")))
| […])
| ELISP> (find-file "/test-dne:does-not-exist-either:/etc/passwd")
| #<buffer passwd>
| ELISP>
The resulting buffer will contain the contents of
/etc/passwd on the primary system (well, there are no
others :-)).
My assumption is that technically this is not an error as
with the great power that Emacs gives to the user comes
great responsibility to set one's variables properly :-).
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.
Tim
- Unexpected "recover" from non-existing tramp-login-program,
Tim Landscheidt <=