[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp-container doesn't follow `ENV PATH` in docker file

From: ParetoOptimalDev
Subject: Re: tramp-container doesn't follow `ENV PATH` in docker file
Date: Thu, 16 Mar 2023 16:19:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

With some debugging I've found out that tramp has the correct path if

- have tramp-own-remote-path in tramp-remote-path
- don't pass the `-l` tramp-login-argument up until line 5538 of
tramp-sh.el of tramp 2.7.0-pre

Here's a snippet for context of that part of `tramp-get-remote-path`:

        ;; Remove double entries.
        (setq elt1 remote-path)
        (while (consp elt1)
          (while (and (car elt1) (setq elt2 (member (car elt1) (cdr elt1))))
            (setcar elt2 nil))
          (setq elt1 (cdr elt1)))

It looks like this when tracing `tramp-send-command-and-read` and 

1 -> (tramp-send-command-and-read (tramp-file-name "docker" nil nil 
"nifty_davinci" nil "" nil) "echo \\\"`uname -sr`\\\"")
1 <- tramp-send-command-and-read: "Linux 6.1.18"
1 -> (tramp-get-remote-path (tramp-file-name "docker" nil nil "nifty_davinci" 
nil "" nil))
| 2 -> (tramp-send-command-and-read (tramp-file-name "docker" nil nil 
"nifty_davinci" nil "" nil) "/bin/sh  -i -c 'echo 
3530864d92d71ab02b08b4a1f9168a38 \\\"$PATH\\\"'" noerror 
| 2 <- tramp-send-command-and-read: 
1 <- tramp-get-remote-path: ("/opt/ghc/9.4.2/bin" "/usr/local/sbin" 
"/usr/local/bin" "/usr/sbin" "/usr/bin" "/sbin" "/bin")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]