Skip to content

Commit 6677065

Browse files
filiptronicekjeanp413
authored andcommitted
Use absolute paths in the startup script
Use Node and entry point from their respective absolute paths in the file system
1 parent 9598c8e commit 6677065

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

resources/server/startup.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
#!/bin/bash
2-
exec ./node/bin/node ./server-pkg/out/server.js "$@"
2+
3+
if [[ "$OSTYPE" == "darwin"* ]]; then
4+
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
5+
ROOT=$(dirname "$(realpath "$0")")
6+
else
7+
ROOT=$(dirname "$(readlink -f $0)")
8+
fi
9+
10+
exec $ROOT/node/bin/node $ROOT/server-pkg/out/server.js "$@"

0 commit comments

Comments
 (0)