aboutsummaryrefslogtreecommitdiff
path: root/src/java
diff options
context:
space:
mode:
authorChuck Lantz <clantz@microsoft.com>2022-11-29 02:07:38 +0300
committerGitHub <noreply@github.com>2022-11-29 02:07:38 +0300
commitd1972b4d8d2dc75370c236c9dafe505ea42590f2 (patch)
tree9bcd472a0fab51cb2c389f6527df5e51f22ec0b0 /src/java
parent4af4c291225a165e5a9b0e5a65c450e81e5aecf0 (diff)
Use _REMOTE_USER when available (#264)
* Use _REMOTE_USER when available * Update src/python/install.sh Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com> * Update src/python/install.sh Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com> * Fix java test issue - JDK 18 not available for the "open" distro * Bump breakfix numbers Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com> Co-authored-by: Josh Spicer <joshspicer@github.com>
Diffstat (limited to 'src/java')
-rw-r--r--src/java/devcontainer-feature.json2
-rw-r--r--[-rwxr-xr-x]src/java/install.sh20
-rw-r--r--src/java/wrapper.sh10
3 files changed, 16 insertions, 16 deletions
diff --git a/src/java/devcontainer-feature.json b/src/java/devcontainer-feature.json
index c400fb6..4c7df03 100644
--- a/src/java/devcontainer-feature.json
+++ b/src/java/devcontainer-feature.json
@@ -1,6 +1,6 @@
{
"id": "java",
- "version": "1.1.0",
+ "version": "1.1.1",
"name": "Java (via SDKMAN!)",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/java",
"description": "Installs Java, SDKMAN! (if not installed), and needed dependencies.",
diff --git a/src/java/install.sh b/src/java/install.sh
index 5928478..bf94963 100755..100644
--- a/src/java/install.sh
+++ b/src/java/install.sh
@@ -9,20 +9,20 @@
#
# Syntax: ./java-debian.sh [JDK version] [SDKMAN_DIR] [non-root user] [Add to rc files flag]
-JAVA_VERSION=${VERSION:-"lts"}
-INSTALL_GRADLE=${INSTALLGRADLE:-"false"}
-GRADLE_VERSION=${GRADLEVERSION:-"latest"}
-INSTALL_MAVEN=${INSTALLMAVEN:-"false"}
-MAVEN_VERSION=${MAVENVERSION:-"latest"}
-JDK_DISTRO=${JDKDISTRO}
+JAVA_VERSION="${VERSION:-"lts"}"
+INSTALL_GRADLE="${INSTALLGRADLE:-"false"}"
+GRADLE_VERSION="${GRADLEVERSION:-"latest"}"
+INSTALL_MAVEN="${INSTALLMAVEN:-"false"}"
+MAVEN_VERSION="${MAVENVERSION:-"latest"}"
+JDK_DISTRO="${JDKDISTRO}"
-export SDKMAN_DIR=${SDKMAN_DIR:-"/usr/local/sdkman"}
-USERNAME=${USERNAME:-"automatic"}
-UPDATE_RC=${UPDATE_RC:-"true"}
+export SDKMAN_DIR="${SDKMAN_DIR:-"/usr/local/sdkman"}"
+USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
+UPDATE_RC="${UPDATE_RC:-"true"}"
# Comma-separated list of java versions to be installed
# alongside JAVA_VERSION, but not set as default.
-ADDITIONAL_VERSIONS=${ADDITIONALVERSIONS:-""}
+ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
set -e
diff --git a/src/java/wrapper.sh b/src/java/wrapper.sh
index d7f05de..bea343f 100644
--- a/src/java/wrapper.sh
+++ b/src/java/wrapper.sh
@@ -3,11 +3,11 @@
set -e
-JAVA_VERSION=${1:-"default"}
-SDKMAN_DIR=${2:-"/usr/local/sdkman"}
-USERNAME=${3:-"automatic"}
-UPDATE_RC=${4:-"true"}
-ADDITIONAL_JAVA_VERSION=11
+JAVA_VERSION="${1:-"default"}"
+SDKMAN_DIR="${2:-"/usr/local/sdkman"}"
+USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
+UPDATE_RC="${4:-"true"}"
+ADDITIONAL_JAVA_VERSION="11"
cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
chmod +x install.sh