Skip to content

Commit 2ffd0f6

Browse files
authored
create: fix difference between HOME and PWD path resolution, only if there is a difference (#50)
1 parent b83b35e commit 2ffd0f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

distrobox-create

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ generate_command() {
215215
--volume /tmp:/tmp:rslave"
216216

217217
# Mount also the /var/home dir on ostree based systems
218-
if [ -d "/var/home/${container_user_name}" ]; then
218+
# do this only if $HOME was not already set to /var/home/username
219+
if [ "${container_user_home}" != "/var/home/${container_user_name}" ] &&
220+
[ -d "/var/home/${container_user_name}" ]; then
221+
219222
result_command="${result_command}
220223
--volume /var/home/${container_user_name}:/var/home/${container_user_name}:rslave"
221224
fi

0 commit comments

Comments
 (0)