Skip to content

Commit 8df61c3

Browse files
committed
fix: resolve ShellCheck errors in entrypoint.sh
- SC2145: replace $@ with $* in info/warn echo strings - SC3043: remove 'local' (undefined in POSIX sh) and quote $1 - SC2015: replace A && B || true anti-pattern with proper if statements
1 parent 99aacf2 commit 8df61c3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

entrypoint.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ set -e
33

44
# Function to output info messages - always to stderr
55
info() {
6-
echo "[INFO] $@" >&2
6+
echo "[INFO] $*" >&2
77
}
88

99
# Function to output warning messages
1010
warn() {
11-
echo "[WARN] $@" >&2
11+
echo "[WARN] $*" >&2
1212
}
1313

1414
# Function to fix permissions on a directory
1515
fix_permissions() {
16-
local dir=$1
16+
dir="$1"
1717
if [ ! -d "$dir" ]; then
1818
warn "Directory $dir does not exist — skipping permission check (doxygen may fail)"
1919
return
@@ -44,8 +44,8 @@ if [ "$(id -u)" = "0" ]; then
4444
info "Remapping doxygen UID:GID to $PUID:$PGID"
4545
if [ -f /etc/alpine-release ]; then
4646
# Alpine
47-
deluser doxygen 2>/dev/null && info "Removed existing doxygen user" || true
48-
delgroup doxygen 2>/dev/null && info "Removed existing doxygen group" || true
47+
if deluser doxygen 2>/dev/null; then info "Removed existing doxygen user"; fi
48+
if delgroup doxygen 2>/dev/null; then info "Removed existing doxygen group"; fi
4949
addgroup -g "$PGID" doxygen
5050
adduser -u "$PUID" -G doxygen -s /bin/sh -D -h /home/doxygen doxygen
5151
elif [ -f /etc/debian_version ]; then

0 commit comments

Comments
 (0)