Fix: Added guard for jdk auto download#362
Open
codeholic-0 wants to merge 1 commit into
Open
Conversation
…39 needs an update), that directly runs link_linux.sh and fails when no jdk is present
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
link_linux: download JDK automatically if missing
Trying to MasonInstall java-language-server on Neovim gave the error:
◍ java-language-server ▼ Displaying full log Cloning git repository "https://github.com/georgewfraser/java-language-server.git"… Cloning into '.'... From https://github.com/georgewfraser/java-language-server * tag v0.2.39 -> FETCH_HEAD + ./scripts/link_linux.sh Error: This JDK does not support linking from the current run-time image spawn: bash failed with exit code 2 and signal 0. Cloning into '.'... From https://github.com/georgewfraser/java-language-server * tag v0.2.39 -> FETCH_HEAD + ./scripts/link_linux.shBecause Mason is running ./script/link_linux.sh which doesn't auto download the jdk before linking and crahses
to fix added :
Added a guard that downloads the jdk automatically if the target
directory doesn't exist, making the script self-contained.