Eskibear / node-jdk-utils

A collection of Java related utils.
MIT License
10 stars 5 forks source link

resolve symbolic links when processing ENVs #3

Closed Eskibear closed 2 years ago

Eskibear commented 2 years ago

See #2

It now resolves the realpath of symbolic links, below is an example of openjdk installed via homebrew.

$ export PATH="/usr/local/opt/openjdk/bin:$PATH"
$ which java
/usr/local/opt/openjdk/bin/java
...
  {
    homedir: '/usr/local/Cellar/openjdk/17.0.1_1/libexec/openjdk.jdk/Contents/Home',
    isInPathEnv: true,
    hasJavac: true,
    version: { java_version: '17.0.1', major: 17 }
  }
...