Skip to content

Commit f40180a

Browse files
committed
Fix code-server.sh script on macOS
1 parent caa299b commit f40180a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ci/code-server.sh

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#!/usr/bin/env sh
2-
# code-server.sh -- Run code-server with the bundled Node binary.
2+
# Runs code-server with the bundled Node binary.
33

4-
dir="$(dirname "$(readlink -f "$0" || realpath "$0")")"
4+
# More complicated than readlink -f or realpath to support macOS.
5+
# See https://github.com/cdr/code-server/issues/1537
6+
get_installation_dir() {
7+
rel="$(readlink "$0")"
8+
cd "$(dirname "$0")"
9+
cd "$(dirname "$rel")"
10+
pwd -P
11+
}
512

13+
dir=$(get_installation_dir)
614
exec "$dir/node" "$dir/out/node/entry.js" "$@"

0 commit comments

Comments
 (0)