Skip to content

Commit

Permalink
create: ignore trailing slashes on custom homes, Fix 1575
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Di Maio <[email protected]>
  • Loading branch information
89luca89 committed Oct 12, 2024
1 parent d706818 commit 8f985e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions distrobox-create
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ while :; do
;;
-H | --home)
if [ -n "$2" ]; then
container_user_custom_home="$2"
# Remove trailing slashes
container_user_custom_home="$(echo "$2" | sed 's:/*$::')"
shift
shift
fi
Expand Down Expand Up @@ -1050,5 +1051,5 @@ if eval ${cmd} > /dev/null; then
else
error="$?"
printf >&2 "\033[31m [ ERR ]\033[0m failed to create container.\n"
exit ${error}
exit "${error}"
fi

0 comments on commit 8f985e3

Please sign in to comment.