Skip to content

Commit 4085d28

Browse files
authored
Fix mc-send-to-console running with uid=0(root) (#3106)
1 parent 7dbeac9 commit 4085d28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/mc-send-to-console

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
1717
exit 1
1818
fi
1919

20-
if [ "$(id -u)" = 0 ]; then
20+
if [ "$(id -u)" = 0 -a $UID != 0 ]; then
2121
if [[ $(getDistro) == alpine ]]; then
2222
exec su-exec minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
2323
else

0 commit comments

Comments
 (0)