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

Do not show "No version is set for command java" without global Java configuration and no Java version set locally #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jarmo
Copy link
Contributor

@jarmo jarmo commented Jul 18, 2024

Having following conditions met:

  1. asdf java plugin has been installed
  2. set-java-home.bash sourced in ~/.bashrc
  3. No global Java version has been configured in ~/.tool-versions
  4. No local Java version configured in local directory or shell

Then opening a new terminal window or moving between directories causes the following annoying message to be shown every time:

No version is set for command java
Consider adding one of the following versions in your config file at 
java temurin-22.0.1+8

This PR hides this message by redirecting stderr of asdf which java command used by set-java-home.bash to /dev/null.

Similar problem probably exists for other supported shells, but since I don't use these then I can't test any changes.

…configuration and no Java version set locally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant