Archived
1
0

Avoid root when prefix is writable

Previously if the prefix was non-existent we would switch to root even
if the user does have the permissions to create the directory.

Fixes #3585
This commit is contained in:
Asher
2021-07-02 19:19:23 -05:00
parent 6045fdd3ac
commit 3339853c26
2 changed files with 22 additions and 1 deletions

View File

@ -24,6 +24,24 @@ jobs:
- name: Test code-server
run: yarn test:standalone-release code-server
alpine:
name: Test installer on Alpine
runs-on: ubuntu-latest
container: "alpine:3.14"
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install curl
run: apk add curl
- name: Add user
run: adduser coder --disabled-password
# Standalone should work without root.
- name: Test standalone to a non-existent prefix
run: su coder -c "./install.sh --method standalone --prefix /tmp/does/not/yet/exist"
macos:
name: Test installer on macOS
runs-on: macos-latest