Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] distrobox-rm with --rm-home fails to delete the custom home #1634

Open
Kamorst opened this issue Dec 17, 2024 · 0 comments
Open

[Error] distrobox-rm with --rm-home fails to delete the custom home #1634

Kamorst opened this issue Dec 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Kamorst
Copy link

Kamorst commented Dec 17, 2024

Please, before opening a bug:

  • make sure you've read the documentation.
  • Ensure there isn't already an open issue about this.
  • Ensure there isn't already a closed/resolved issue about this.

Describe the bug

distrobox rm --rm-home does not remove the custom home.
It fails with the message rm: cannot remove '"$container_home"': No such file or directory
$container_home is the custom home path used in distrobox create -H.

To Reproduce
Create a container with a custom home and try to delete it using --rm-home.

$> distrobox create -n tmp -H /home/$USER/tmp
$> distrobox rm --rm-home tmp

Expected behavior
To distrobox successfully delete the custom home of the container.

Logs
Run the commands with --verbose and post the log here as a file upload
Attach also the output of podman logs or docker logs, possibly with --latest flag

Desktop (please complete the following information):

  • Are you using podman, docker or lilipod? podman
  • Which version or podman, docker or lilipod? 5.3.1
  • Which version of distrobox? 1.8.0
  • Which host distribution? fedora 41
  • How did you install distrobox? ./install script after cloning this repo

Additional context
Remove the printf pipe in the line 362 of the distrobox-rm fixes the issue with (apparently) no side effects besides the stdout message not containing double quotes on the path.

-               '{{range .Config.Env}}{{if and (ge (len .) 5) (eq (slice . 0 5) "HOME=")}}{{slice . 5 | printf "%q"}}{{end}}{{end}}' "${container_name}")
+               '{{range .Config.Env}}{{if and (ge (len .) 5) (eq (slice . 0 5) "HOME=")}}{{slice . 5}}{{end}}{{end}}' "${container_name}")

log_create.txt
log_rm.txt

@Kamorst Kamorst added the bug Something isn't working label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant