Skip to content

Commit bcb7606

Browse files
authored
add more windows code
1 parent 7134b45 commit bcb7606

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

main.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
set -ex
33

44
if [[ $RUNNER_OS == Windows ]]; then
5+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
56
old_node_version=$(node --version)
67
old_node_version=${old_node_version:1}
78
nvm install 16
89
nvm use 16
910
old_script_shell=$(npm config get script-shell)
10-
npm config set script-shell 'C:\Program Files\git\bin\bash.exe'
11-
npm install --global "code-server@$INPUT_VERSION" --unsafe-perm
11+
# https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md#shells
12+
npm config set script-shell 'C:\Windows\System32\bash.exe'
13+
npm install --global "code-server@$INPUT_CODE_SERVER_VERSION" --unsafe-perm
1214
npm config set script-shell "$old_script_shell"
1315
nvm use "$old_node_version"
1416
else
1517
curl -fsSL https://code-server.dev/install.sh | sh -s -- \
16-
--prefix=/usr/local --version "$INPUT_VERSION"
18+
--prefix=/usr/local --version "$INPUT_CODE_SERVER_VERSION"
1719
fi

0 commit comments

Comments
 (0)