Skip to content

Commit 15e139b

Browse files
authored
feat: treat wheel group as sudo (#1221)
Many distros use `wheel` as the group that grants sudo permissions. Check for it in addition to the `sudo` group in the `build_container` script.
1 parent cbcb87e commit 15e139b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/build_container

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if [ $NEED_SUDO -eq 0 ]; then
3636
FAKEROOT=--fakeroot
3737
echo "Using fakeroot"
3838
else
39-
if [[ ! -z "$GITHUB_RUN_ID" || `groups` == *"sudo"* ]]; then
39+
if [[ ! -z "$GITHUB_RUN_ID" || $(groups) =~ (^|[[:space:]])(sudo|wheel)([[:space:]]|$) ]]; then
4040
# user has sudo permission
4141
SUDO=sudo
4242
FAKEROOT=""

0 commit comments

Comments
 (0)