technomancy / leiningen

Moved to Codeberg; this is a convenience mirror
https://codeberg.org/leiningen/leiningen
Other
7.29k stars 1.61k forks source link

Leiningen hangs instead of complaining about not finding JAVA_HOME #2815

Open spiralnegative opened 5 months ago

spiralnegative commented 5 months ago

Initial debugging steps Before creating a report, especially around exceptions being thrown when running Leiningen, please check if the error still occurs after:

Describe the bug When I run any lein command (e.g. lein migrate) my terminal just hangs and no output is produced. After some debugging I found out that JAVA_HOME in my .zshrc was pointing to the wrong directory. Fixing the directory also fixed my problem.

To Reproduce Steps to reproduce the behavior:

  1. Go to your .bashrc/.zshrc/etc and change the JAVA_HOME directory to something else
  2. Check lein version - it should output the correct Java, e.g. Leiningen 2.11.2 on Java 1.8.0_401 Java HotSpot(TM) 64-Bit Server VM in my case
  3. Run any lein command - e.g. lein test

Actual behavior Any lein command produces no output and just hangs for minutes.

Expected behavior lein commands to output a message about wrong Java directory

Link to sample project not relevant

Logs not relevant

Environment

Additional context not relevant

technomancy commented 5 months ago

I can't reproduce this running from source or installed from apt-get. Is it possible this is a distro-specific issue with the homebrew packaging?