emacs-pe / docker-tramp.el

TRAMP integration for docker containers
339 stars 26 forks source link

Error due to HOME env inside container / interaction with `tramp-histfile-override` #26

Open GPPassos opened 4 years ago

GPPassos commented 4 years ago

Hi,

I noticed a problem due to interaction of docker-tramp with the variable tramp-histfile-override. The default value for this variable is ~/.tramp_history. However, this is troublesome for when the environment variable HOME inside the container has some kind of problem (for instance, it is empty, or it refers to a non-existing directory, which may happen to some containers).

The problem is that, when trying to connect to a container in which this is the case, the connection simply fails, and there is no clear error message that it is due to that. (I found out increasing the debug level of tramp-verbose, but of course until I found out this variable was a thing, and that it refers to a file inside the container and not in my machine...)

I am not really sure if there is any thing possible (or convenient) to solve this problem in docker-tramp, but I think it would be really useful if on the README or something similar it could be reminded to the user that the value of tramp-histfile-override should be accessible in the container. :smiley:

What do you think?

Thank you for your work, this is a really useful package to me.