Skip to content

Commit d781d0e

Browse files
committed
Sanitize tmux session name
1 parent 3376fc4 commit d781d0e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/versions.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
IMAGE_VERSION=1.21.15
1+
IMAGE_VERSION=1.21.16
22
NDK_VERSION=27.2.12479018
33
BAZELISK_VERSION=v1.26.0

android_dev/entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ WORKSPACE_DIR="/opt/workspace"
1717
REPO_NAME=$(basename "${GIT_REPO}")
1818
CLONE_DIR="${WORKSPACE_DIR}/${REPO_NAME}"
1919

20-
# Define the tmux session name
21-
TMUX_SESSION_NAME="${GIT_BRANCH}-${REPO_NAME}"
20+
# Define the tmux session name - sanitize to use only safe characters
21+
TMUX_SESSION_NAME=$(echo "${GIT_BRANCH}-${REPO_NAME}" | sed 's/[^a-zA-Z0-9_-]/_/g')
2222
export TMUX_SESSION_NAME
2323

2424
# --- 1. Clone Git Repository ---
@@ -64,8 +64,10 @@ copy_fix_dir_permissions "/home/${ACTUAL_USER}/.gnupg"
6464
copy_fix_dir_permissions "/home/${ACTUAL_USER}/.gemini"
6565
copy_fix_file_owner "/home/${ACTUAL_USER}/.gitconfig"
6666
# Android SDK can be updated on the fly (with newly request build-tools etc)
67+
echo "Fixing ownership for ${ANDROID_HOME}..."
6768
chown -R ${ACTUAL_USER}:${ACTUAL_USER} "${ANDROID_HOME}"
6869
# Allowing our user to install npm stuff
70+
echo "Fixing ownership for nvm and pnpm..."
6971
chown -R ${ACTUAL_USER}:${ACTUAL_USER} /opt/nvm
7072
chown -R ${ACTUAL_USER}:${ACTUAL_USER} /opt/.pnpm
7173

0 commit comments

Comments
 (0)