Skip to content

fix OSX post java tarball Contents dir glob#88

Open
lgatellier wants to merge 1 commit into
sdkman:masterfrom
lgatellier:master
Open

fix OSX post java tarball Contents dir glob#88
lgatellier wants to merge 1 commit into
sdkman:masterfrom
lgatellier:master

Conversation

@lgatellier
Copy link
Copy Markdown

@lgatellier lgatellier commented Apr 30, 2026

Summary

At least some tarballs now contains 2 levels of directories instead of 1, which breaks the glob matching.
e.g. /zulu8.54.0.21-ca-jdk8.0.292-macosx_aarch64/zulu-8.jdk for sdk install java 8.0.292-zulu
The problem is also present for other java versions like 11.0.25-zulu, 17.0.13-zulu or 21.0.5-zulu.

The tarball internal directory tree might have changed recently and the post-download hook haven't been modified.

Log output

% set -x ; sdk install java 8.0.292-zulu
# ...
# Truncated output
# ...
+__sdkman_post_installation_hook:10> __sdkman_echo_green 'Repackaging Java 8.0.292-zulu...'
+__sdkman_echo_green:1> __sdkman_echo 32m 'Repackaging Java 8.0.292-zulu...'
+__sdkman_echo:1> [[ true == false ]]
+__sdkman_echo:4> echo -e '\033[1;32mRepackaging Java 8.0.292-zulu...\033[0m'
Repackaging Java 8.0.292-zulu...
+__sdkman_post_installation_hook:12> mkdir -p /Users/l.gatellier/devtools/sdkman/tmp/out
+__sdkman_post_installation_hook:13> /usr/bin/env tar zxf /Users/l.gatellier/devtools/sdkman/tmp/java-8.0.292-zulu.bin -C /Users/l.gatellier/devtools/sdkman/tmp/out
__sdkman_post_installation_hook:15: no matches found: /Users/l.gatellier/devtools/sdkman/tmp/out/*/Contents
 % find tmp -name Contents
tmp/out/zulu8.54.0.21-ca-jdk8.0.292-macosx_aarch64/zulu-8.jdk/Contents

At least some tarballs now contains 2 levels of directories
instead of 1, which breaks the glob matching.
e.g. /zulu8.54.0.21-ca-jdk8.0.292-macosx_aarch64/zulu-8.jdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant