File tree 2 files changed +16
-4
lines changed
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,30 @@ set -eu
4
4
main () {
5
5
cd lib/vscode
6
6
7
+ if ! echo " $npm_config_user_agent " | grep yarn; then
8
+ # We are using 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
+ fi
17
+
7
18
# We have to rename node_modules.bundled to node_modules.
8
19
# The bundled modules were renamed originally to avoid being ignored by yarn.
9
- local node_modules
10
20
node_modules=" $( find . -depth -name " node_modules.bundled" ) "
11
- local nm
12
21
for nm in $node_modules ; do
13
22
rm -Rf " ${nm% .bundled} "
14
23
mv " $nm " " ${nm% .bundled} "
15
24
done
16
25
17
26
# Rebuilds native modules.
18
- npm rebuild
27
+ # We use `env -i` to reset the environment.
28
+ # npm_config_global can make npm rebuild return instantly.
29
+ # There may be more so we just do a blanket reset.
30
+ env -i " $SHELL " -lc ' npm rebuild --verbose'
19
31
}
20
32
21
33
main " $@ "
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.23 " ,
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