We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 343b1a8 commit 3eecda0Copy full SHA for 3eecda0
bin/build_container
@@ -36,10 +36,11 @@ if [ $NEED_SUDO -eq 0 ]; then
36
FAKEROOT=--fakeroot
37
echo "Using fakeroot"
38
else
39
- if [[ ! -z "$GITHUB_RUN_ID" || `groups` == *"sudo"* || `groups` == *"wheel"* ]]; then
+ if [[ -n "$GITHUB_RUN_ID" || $(groups) =~ (^|[[:space:]])(sudo|wheel)([[:space:]]|$) ]]; then
40
# user has sudo permission
41
SUDO=sudo
42
FAKEROOT=""
43
+ echo "Using sudo"
44
45
echo "You appear to have neither namespace or sudo permission. You need one to build."
46
echo " Either: "
@@ -51,6 +52,8 @@ else
51
52
fi
53
54
55
+exit
56
+
57
# make container home directory (~)
58
if [ ! -d "${ROOT}/.home" ]; then
59
mkdir -p ${ROOT}/.home
0 commit comments