Skip to content

Commit 05894ea

Browse files
chore: update script
1 parent 394d3d6 commit 05894ea

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/code-server/install.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ cat > /usr/local/bin/code-server-entrypoint <<EOF
7979
#!/usr/bin/env bash
8080
set -e
8181
82-
$(declare -p FLAGS)
82+
if [[ \$(whoami) != "$_REMOTE_USER" ]]; then
83+
su $_REMOTE_USER -c /usr/local/bin/code-server-entrypoint
84+
else
85+
$(declare -p FLAGS)
8386
84-
CMD="code-server \${FLAGS[@]} \"$CODE_SERVER_WORKSPACE\""
85-
86-
su $_REMOTE_USER -c "\$CMD"
87+
code-server "\${FLAGS[@]}" "$CODE_SERVER_WORKSPACE"
88+
fi
8789
EOF
8890

8991
chmod +x /usr/local/bin/code-server-entrypoint

0 commit comments

Comments
 (0)