File tree 5 files changed +25
-8
lines changed
5 files changed +25
-8
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ systemctl --user enable --now code-server
35
35
36
36
### npm
37
37
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 .
40
40
41
41
``` bash
42
42
npm install -g code-server
Original file line number Diff line number Diff line change @@ -4,18 +4,34 @@ set -eu
4
4
main () {
5
5
cd lib/vscode
6
6
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
+
7
19
# We have to rename node_modules.bundled to node_modules.
8
20
# The bundled modules were renamed originally to avoid being ignored by yarn.
9
- local node_modules
10
21
node_modules=" $( find . -depth -name " node_modules.bundled" ) "
11
- local nm
12
22
for nm in $node_modules ; do
13
23
rm -Rf " ${nm% .bundled} "
14
24
mv " $nm " " ${nm% .bundled} "
15
25
done
16
26
27
+ # $npm_config_global makes npm rebuild return without rebuilding.
28
+ unset npm_config_global
17
29
# 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
19
35
}
20
36
21
37
main " $@ "
Original file line number Diff line number Diff line change @@ -75,4 +75,7 @@ download_artifact() {
75
75
curl -sSL " $( get_artifact_url " $artifact_name " ) " > " $tmp_file "
76
76
unzip -o " $tmp_file " -d " $dst "
77
77
rm " $tmp_file "
78
+
79
+ # https://github.com/actions/upload-artifact/issues/38
80
+ chmod +x $( grep -rl ' ^#!/.\+' " $dst " )
78
81
}
Original file line number Diff line number Diff line change @@ -10,8 +10,6 @@ main() {
10
10
fi
11
11
12
12
download_artifact npm-package ./release
13
- # https://github.com/actions/upload-artifact/issues/38
14
- chmod +x $( grep -rl ' ^#!/.\+' release)
15
13
yarn publish --non-interactive release
16
14
}
17
15
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " code-server" ,
3
3
"license" : " MIT" ,
4
- "version" : " 3.3.0-rc.21 " ,
4
+ "version" : " 3.3.0-rc.24 " ,
5
5
"description" : " Run VS Code on a remote server." ,
6
6
"homepage" : " https://github.com/cdr/code-server" ,
7
7
"bugs" : {
You can’t perform that action at this time.
0 commit comments