Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ESCAPED_JAVA_CMD so that JAVA_CMD='C:\java\jdk-17.0.8+7\bin\jav… #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ client
.clj-kondo/
.lsp/
server/.nrepl-port
.calva/
5 changes: 4 additions & 1 deletion bin/start-client
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ fi

printf "\033[32m[start-client]\033[0m GUI wird gestartet. Das dauert einen Augenblick ....\n"

## Taken from https://stackoverflow.com/a/2705678
ESCAPED_JAVA_CMD=$(printf '%s\n' "${JAVA_CMD}" | sed -e 's/[\/&]/\\&/g')

clojure -A:launcher-api -M -e '
(do
(require (quote [lambdaisland.witchcraft.launcher-api :as l])
Expand All @@ -66,4 +69,4 @@ clojure -A:launcher-api -M -e '
(l/launcher-backend "client")
(l/session {:username "'"$1"'" :session-id "x" :uuid (str (random-uuid))})
"'"$MC_VERSION"'")))
' | sed "s^java^${JAVA_CMD}^" | sh
' | sed "s^java^'${ESCAPED_JAVA_CMD}'^" | sh