Skip to content

Commit 5be3f8d

Browse files
committed
Fix a shellcheck warning about word splitting
Error: SHELLCHECK_WARNING (CWE-156): [#def2] /etc/profile.d/podman-docker.sh:4:10: warning[SC2046]: Quote this to prevent word splitting. 2| 3| if [ -z "${DOCKER_HOST-}" ]; then 4|-> if [ $(id -u) -eq 0 ]; then 5| export DOCKER_HOST=unix:///run/podman/podman.sock 6| else Resolves: https://openscanhub.fedoraproject.org/task/52458/log/podman-5.4.2-1.fc43/scan-results.html#def2 Signed-off-by: Siteshwar Vashisht <[email protected]>
1 parent c0b352f commit 5be3f8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/podman-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DOCKER_HOST initialization
22

33
if [ -z "${DOCKER_HOST-}" ]; then
4-
if [ $(id -u) -eq 0 ]; then
4+
if [ "$(id -u)" -eq 0 ]; then
55
export DOCKER_HOST=unix:///run/podman/podman.sock
66
else
77
if [ -n "${XDG_RUNTIME_DIR-}" ]; then

0 commit comments

Comments
 (0)