@@ -68,15 +68,6 @@ if [ -z "$USER_HOME" ]; then
68 USER_HOME="/home/${SSH_USER}"
68 USER_HOME="/home/${SSH_USER}"
72− runuser -u "$SSH_USER" -- env HOME="$USER_HOME" "$@"
75−# Ensure user cache dirs are writable (mise writes under ~/.cache/mise)
76−install -d -m 700 -o "$SSH_USER" -g "$SSH_USER" "${USER_HOME}/.cache"
77−install -d -m 700 -o "$SSH_USER" -g "$SSH_USER" "${USER_HOME}/.cache/mise"
78−chown -R "$SSH_USER:$SSH_USER" "${USER_HOME}/.cache" 2>/dev/null || true
80# Home mount links (config-driven)
71# Home mount links (config-driven)
81__VIBEBOX_HOME_LINKS__
72__VIBEBOX_HOME_LINKS__
@@ -98,7 +89,7 @@ fi
98# Install Mise
89# Install Mise
99MISE_BIN="${USER_HOME}/.local/bin/mise"
90MISE_BIN="${USER_HOME}/.local/bin/mise"
100if [ ! -x "$MISE_BIN" ] && ! command -v mise >/dev/null 2>&1; then
91if [ ! -x "$MISE_BIN" ] && ! command -v mise >/dev/null 2>&1; then
101− run_as_user sh -c 'curl https://mise.run | sh'
92+ curl https://mise.run | HOME="$USER_HOME" sh
103echo 'eval "$(~/.local/bin/mise activate bash)"' >> "${USER_HOME}/.bashrc"
94echo 'eval "$(~/.local/bin/mise activate bash)"' >> "${USER_HOME}/.bashrc"
@@ -122,11 +113,10 @@ MISE
123touch "${USER_HOME}/.config/mise/mise.lock"
114touch "${USER_HOME}/.config/mise/mise.lock"
124if [ -x "$MISE_BIN" ]; then
115if [ -x "$MISE_BIN" ]; then
125− run_as_user "$MISE_BIN" install
116+ HOME="$USER_HOME" "$MISE_BIN" install
127− run_as_user mise install
118+ HOME="$USER_HOME" mise install
129−chown -R "$SSH_USER:$SSH_USER" "${USER_HOME}/.cache" "${USER_HOME}/.config/mise" "${USER_HOME}/.local/share/mise" 2>/dev/null || true
131# 3) start ssh (don't swallow failures)
121# 3) start ssh (don't swallow failures)
132# If ssh is already active, don't force start/restart.
122# If ssh is already active, don't force start/restart.