Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Fix readonly UID warning #212

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ fi
# 501:*:501:0:container user:/home/runner:/bin/sh
# shellcheck disable=SC2046
if ! whoami &> /dev/null || ! /usr/bin/getent passwd $(whoami || id -u) &> /dev/null ; then
UID=$(id -u)
MY_UID=$(id -u)
if [ -n "${EP_DEBUG:-}" ]; then
echo "adding missing uid $UID into /etc/passwd"
echo "adding missing uid $MY_UID into /etc/passwd"
fi
echo "$UID:x:$UID:0:container user:/home/runner:/bin/bash" >> /etc/passwd
echo "$MY_UID:x:$MY_UID:0:container user:/home/runner:/bin/bash" >> /etc/passwd
export HOME=/home/runner
fi

Expand Down