From 6802f963d0e02565f88a7c67a1047f8a5420d89d Mon Sep 17 00:00:00 2001 From: Ameer Hamza Khan Date: Sun, 27 Jul 2025 16:11:56 +0000 Subject: [PATCH] Fix a minor issue. this prevent runtime issue if a file is mounted in home dir, like .ssh. --- scripts/entrypoint.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index a176db9..2f82465 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -38,14 +38,9 @@ trap 'term_handler' SIGTERM SIGINT # setup home directory for the current user. It is useful for attaching vscode with container. user_name=$(whoami) user_home="/home/$user_name" - -# Only create home directory if it doesn't exist (handles mounted /etc/passwd case) -if [[ ! -d "$user_home" ]]; then - sudo mkdir -p "$user_home" - sudo chown -R "$(id -u):$(id -g)" "$user_home" - # Copy skeleton files only if home directory was created - cp -r /etc/skel/. "$user_home" 2>/dev/null || true -fi +sudo mkdir -p "$user_home" +sudo chown -R "$(id -u):$(id -g)" "$user_home" +cp -r /etc/skel/. "$user_home" 2>/dev/null || true if [[ $LOG_FILE != "/dev/null" ]]; then sudo touch "$LOG_FILE"