brainvisa / casa-distro

Unified development environment for BrainVISA projects.
2 stars 1 forks source link

Symlinks to config directories in $HOME appear broken on the host #338

Closed ylep closed 1 year ago

ylep commented 1 year ago

When I implemented https://github.com/brainvisa/casa-distro/pull/329 I used /host to prefix the linked directories, which has the benefit of working in all cases inside the container, but it results in symbolic links that have no sense on the host, where /host does not exist.

The symlinks still work in the container, but they may puzzle people who look in ~/.local/share/casa-distro/<directory>/home. A tidier solution would be to use a path that is valid both on the host and in the container, e.g.

However, we cannot assume that the host $HOME is always in a bind-mounted directory (/home, /volatile...), so we have to check at link creation time if that is the case, and resort to /host as a fallback.