From bd016b6ce2648d66c0d1db7aeed158e769f03383 Mon Sep 17 00:00:00 2001 From: Shu Kutsuzawa Date: Sat, 4 Apr 2020 04:02:28 +0900 Subject: feat: Enable to display language version when `.-version` file exists. (#1028) * adjust https://github.com/sonnym/elmenv * adjust https://github.com/syndbg/goenv * adjust https://github.com/jenv/jenv * adjust https://github.com/nodenv/nodenv * adjust https://github.com/phpenv/phpenv * adjust https://github.com/rbenv/rbenv * add description * golang.rs is executed rustfmt * add testcases --- src/modules/java.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/java.rs') diff --git a/src/modules/java.rs b/src/modules/java.rs index 1b9e709b1..177e95451 100644 --- a/src/modules/java.rs +++ b/src/modules/java.rs @@ -9,11 +9,11 @@ use crate::utils; /// /// Will display the Java version if any of the following criteria are met: /// - Current directory contains a file with a `.java`, `.class`, `.gradle` or `.jar` extension -/// - Current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file +/// - Current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file pub fn module<'a>(context: &'a Context) -> Option> { let is_java_project = context .try_begin_scan()? - .set_files(&["pom.xml", "build.gradle.kts", "build.sbt"]) + .set_files(&["pom.xml", "build.gradle.kts", "build.sbt", ".java-version"]) .set_extensions(&["java", "class", "jar", "gradle"]) .is_match(); -- cgit v1.2.3