This repository has been archived on 2023-01-08. You can view files and clone it, but cannot push or open issues or pull requests.
ptrcports/code-oss/launcher.patch
2022-06-12 03:32:12 +02:00

25 lines
705 B
Diff

--- a/resources/linux/bin/code.sh
+++ b/resources/linux/bin/code.sh
@@ -44,20 +44,9 @@
fi
fi
-if [ ! -L "$0" ]; then
- # if path is not a symlink, find relatively
- VSCODE_PATH="$(dirname "$0")/.."
-else
- if command -v readlink >/dev/null; then
- # if readlink exists, follow the symlink and find relatively
- VSCODE_PATH="$(dirname "$(readlink -f "$0")")/.."
- else
- # else use the standard install location
- VSCODE_PATH="/usr/share/@@APPNAME@@"
- fi
-fi
+VSCODE_PATH="/usr/lib/code-oss"
-ELECTRON="$VSCODE_PATH/@@APPNAME@@"
+ELECTRON="/usr/bin/electron"
CLI="$VSCODE_PATH/resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --ms-enable-electron-run-as-node "$@"
exit $?