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

It is overriding my terminal settings #4

Closed
thslopes opened this issue Aug 30, 2024 · 3 comments
Closed

It is overriding my terminal settings #4

thslopes opened this issue Aug 30, 2024 · 3 comments

Comments

@thslopes
Copy link

It is overriding my terminal settings without ask for

@cypher256
Copy link
Owner

cypher256 commented Aug 30, 2024

This issue can be resolved in one of the following ways:

  • Add "javaAutoConfig.enabled": false, to your settings.json
  • Copy the terminal.integrated.profiles entry and create it under a different name.
    e.g. Copy JavaSE-21 LTS to JavaSE-21 MyCustom and edit it

Note: Profiles named JavaSE-{n} and JavaSE-{n} LTS in 'terminal.integrated.profiles' are managed profiles, and they will always be overwritten by configurations from java.configuration.runtimes.
https://github.com/cypher256/java-extension-pack?tab=readme-ov-file#terminal-auto-configuration

@cypher256 cypher256 pinned this issue Sep 6, 2024
@sw0ok
Copy link

sw0ok commented Dec 3, 2024

This also overrides ZDOTDIR env variable, as I mistakenly installed this it stopped resolving my .zshrc correctly because of that.

@cypher256
Copy link
Owner

cypher256 commented Dec 4, 2024

To address this, I have updated the extension to check if the ZDOTDIR environment variable is already set.
If it is, the extension will no longer override it in the settings.json file.
However, if JAVA_HOME is set in the zsh configuration specified by the ZDOTDIR environment variable, it will take precedence, and the JAVA_HOME setting in the built-in .zshrc of this extension will be disabled.
Please update to the latest version of the extension and let us know if this resolves the issue.

Built-in .zshrc

if [ -r ~/.zshrc ]; then
	JAVA_HOME_BACKUP=$JAVA_HOME
	source ~/.zshrc
	if [ -n "$JAVA_HOME_BACKUP" ]; then
		export JAVA_HOME=$JAVA_HOME_BACKUP
	fi
fi
export PATH="$JAVA_HOME/bin:$AUTO_CONFIG_PATH:$PATH"

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

No branches or pull requests

3 participants