File tree Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ systemctl --user enable --now code-server
3535
3636### npm
3737
38- ** note:** Installing via ` npm ` requires building native module dependencies. See [ ./doc/npm.md ] ( ./doc/npm.md )
39- for the dependency install process depending on your OS .
38+ ** note:** Installing via ` npm ` requires certain dependencies for the native module builds.
39+ See [ ./doc/npm.md ] ( ./doc/npm.md ) for installing these dependencies .
4040
4141``` bash
4242npm install -g code-server
Original file line number Diff line number Diff line change @@ -4,18 +4,34 @@ set -eu
44main () {
55 cd lib/vscode
66
7+ case " ${npm_config_user_agent-} " in npm* )
8+ # We are running under npm.
9+ if [ " ${npm_config_unsafe_perm-} " != " true" ]; then
10+ echo " Please pass --unsafe-perm to npm to install code-server"
11+ echo " Otherwise the postinstall script does not have permissions to run"
12+ echo " See https://docs.npmjs.com/misc/config#unsafe-perm"
13+ echo " See https://stackoverflow.com/questions/49084929/npm-sudo-global-installation-unsafe-perm"
14+ exit 1
15+ fi
16+ ;;
17+ esac
18+
719 # We have to rename node_modules.bundled to node_modules.
820 # The bundled modules were renamed originally to avoid being ignored by yarn.
9- local node_modules
1021 node_modules=" $( find . -depth -name " node_modules.bundled" ) "
11- local nm
1222 for nm in $node_modules ; do
1323 rm -Rf " ${nm% .bundled} "
1424 mv " $nm " " ${nm% .bundled} "
1525 done
1626
27+ # $npm_config_global makes npm rebuild return without rebuilding.
28+ unset npm_config_global
1729 # Rebuilds native modules.
18- npm rebuild
30+ if ! npm rebuild; then
31+ echo " You may not have the required dependencies to build the native modules."
32+ echo " Please see https://github.com/cdr/code-server/blob/master/doc/npm.md"
33+ exit 1
34+ fi
1935}
2036
2137main " $@ "
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ set -euo pipefail
44main () {
55 cd " $( dirname " $0 " ) /../.."
66
7+ # https://github.com/actions/upload-artifact/issues/38
8+ chmod +x $( grep -rl ' ^#!/.\+' release)
9+
710 yarn release:static
811 yarn test:static-release
912 yarn package
Original file line number Diff line number Diff line change 11{
22 "name" : " code-server" ,
33 "license" : " MIT" ,
4- "version" : " 3.3.0-rc.21 " ,
4+ "version" : " 3.3.0-rc.24 " ,
55 "description" : " Run VS Code on a remote server." ,
66 "homepage" : " https://github.com/cdr/code-server" ,
77 "bugs" : {
You can’t perform that action at this time.
0 commit comments