Skip to content

Commit

Permalink
fix: fixed assemble start_now option with root (#1074)
Browse files Browse the repository at this point in the history
when assembling	the following example file:
```
[fedora]
root=true
start_now=true
```
distrobox fails	to enter the container because it does not pass the --root flag.
this commit fixes that.

Co-authored-by: diogo464 <[email protected]>
  • Loading branch information
diogo464 and diogo464 authored Feb 1, 2024
1 parent 08b4ff5 commit 038a843
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion distrobox-assemble
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ run_distrobox() (
# If we need to start immediately, do it, so that the container
# is ready to be entered.
if [ -n "${start_now}" ] && [ "${start_now}" -eq 1 ]; then
"${distrobox_path}"/distrobox enter "${name}" -- touch /dev/null
if [ -n "${root}" ] && [ "${root}" -eq 1 ]; then
"${distrobox_path}"/distrobox enter --root "${name}" -- touch /dev/null
else
"${distrobox_path}"/distrobox enter "${name}" -- touch /dev/null
fi
fi

# if there are exported bins and apps declared, let's export them
Expand Down

0 comments on commit 038a843

Please sign in to comment.