Go HomeDir reads /etc/passwd, not $HOME

For the record, upstream was very nice here and he patched the source code to first search for $HOME:

So, I guess that an option would be to accept that snaps are not fully transparent, for cases like this, and document best practices for upstreams to adjust their code to work with snaps.

Another such case that comes to mind is bitcoin, that requires a patch to save the blockchain to $SNAP_USER_COMMON instead of $SNAP_USER_DATA. This is not transparent because upstreams that want to save data will just do throw everything in $HOME; but we are introducing the concept of versioned and unversioned home, and they would have to adjust their source code to use it correctly.

1 Like