Skip to content

Commit

Permalink
export: do not use sudo login
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Di Maio <[email protected]>
  • Loading branch information
89luca89 committed Feb 1, 2024
1 parent cb11caf commit 86114cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distrobox-export
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ fi
# Command to execute
container_command_suffix="${exported_bin} ${extra_flags} \"\$@\""

sudo_prefix="sudo -S -i -u ${USER}"
sudo_prefix="sudo -S -u ${USER}"

# Edge case for systems without sudo
if command -v su-exec > /dev/null >&1; then
Expand All @@ -227,7 +227,7 @@ fi

# Check if exported application/binary should be run with sudo privileges
if [ "${is_sudo}" -ne 0 ]; then
sudo_prefix="sudo -S -i"
sudo_prefix="sudo -S"

# Edge case for systems without sudo
if command -v su-exec > /dev/null >&1; then
Expand Down

0 comments on commit 86114cf

Please sign in to comment.