mill
mill copied to clipboard
Inconsistent environment variable handling, `JAVA_HOME` is ignored
Mill is handling environment variables inconsistently.
Most env vars have a higher priority that file-based configurations. E.g. We allow to change the Mill version with MILL_VERSION, even when there is a .mill-version file present.
But a JAVA_HOME variable is ignored, when .mill-jvm-version is present and set. IMHO, we should only use .mill-jvm-version, when there is no explicit JAVA_HOME. E.g. when the user has a java executable on the path but no JAVA_HOME env var defined, Mill should use the config from .mill-jvm-version.