We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents caa299b + 401f08d commit 8608ae2Copy full SHA for 8608ae2
ci/code-server.sh
@@ -1,6 +1,18 @@
1
#!/usr/bin/env sh
2
-# code-server.sh -- Run code-server with the bundled Node binary.
+# Runs code-server with the bundled Node binary.
3
4
-dir="$(dirname "$(readlink -f "$0" || realpath "$0")")"
+# 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
+ # We read the symlink, which may be relative from $0.
8
+ dst="$(readlink "$0")"
9
+ # We cd into the $0 directory.
10
+ cd "$(dirname "$0")"
11
+ # Now we can cd into the dst directory.
12
+ cd "$(dirname "$dst")"
13
+ # Finally we use pwd -P to print the absolute path of the directory of $dst.
14
+ pwd -P
15
+}
16
17
+dir=$(get_installation_dir)
18
exec "$dir/node" "$dir/out/node/entry.js" "$@"
0 commit comments