distrobox icon indicating copy to clipboard operation
distrobox copied to clipboard

[Error] Typo in `generate_enter_command` function of the `distrobox enter` command

Open manan-gup opened this issue 10 months ago • 1 comments

The backslash escaping the final double-quote is in the wrong position. https://github.com/89luca89/distrobox/blob/867f4f85c762bc74bf398c8654984b801138e154/distrobox-enter#L391-L394

If I understand this correctly it should be:

else
		result_command="${result_command}
			--user=\"${USER}\""
fi

I found it when I created a container using the following command:

distrobox create --name fedora-rawhide --init --additional-packages "systemd" --image registry.fedoraproject.org/fedora:rawhide

And I got the following error while using distrobox enter:

fish: command substitutions not allowed here
$(getent passwd user | cut -f 7 -d :) -l
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

The login shell on my host is obviously fish (3.7.1).

podman 5.0.1 distrobox 1.7.1.0 installed from the ArchLinux extra repo on EndeavourOS.

manan-gup avatar Apr 08 '24 16:04 manan-gup

related to #1260

manan-gup avatar Apr 08 '24 16:04 manan-gup