Skip to content

Commit

Permalink
ci: use var not var_os
Browse files Browse the repository at this point in the history
  • Loading branch information
nmammeri committed Jun 10, 2024
1 parent 72cb5c1 commit 08e798a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extract-core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ pub fn check_graalvm(target_os: &str) {
sdk install java {} \n \
sdk use java {}", graalvm_version, graalvm_version);

let java_home = env::var_os("JAVA_HOME").map(PathBuf::from);
let java_home = env::var("JAVA_HOME").map(PathBuf::from);

match java_home {
Some(java_home) => {
Ok(java_home) => {
// Check that native-image is in JAVA_HOME/bin
let native_image = java_home.join("bin").join(native_image_exe);
if !native_image.exists() {
panic!("Your JAVA_HOME env variable is pointing to: {}. Please make sure your \
JAVA_HOME is pointing to a valid GraalVM JDK. {}", java_home.display(), help_msg);
}
}
None => {
Err(_) => {
panic!("Could not find a valid GraalVM JDK. Please make sure your your JAVA_HOME is
to pointing to a valid GraalVM JDK. {}", help_msg);
}
Expand Down

0 comments on commit 08e798a

Please sign in to comment.