Skip to content

Commit

Permalink
fix: bundled software not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jagodevreede committed Jul 12, 2024
1 parent 6e43753 commit f479b36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdkman-bundled-software/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<phase>compile</phase>
<goals>
<goal>single</goal>
</goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ public static InputStream getSoftwareStream() {

public static void extract(File destinationFolder) throws IOException {
InputStream softwareStream = getSoftwareStream();
if (softwareStream == null) {
return;
}
destinationFolder.mkdirs();
// extract zip file
byte[] buffer = new byte[1024];
ZipInputStream zis = new ZipInputStream(softwareStream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public final class ConfigurationUtil {
static boolean preCheck(Stage stage) throws IOException {
SdkManUiPreferences sdkManUiPreferences = ServiceRegistry.INSTANCE.getSdkManUiPreferences();
if (!sdkManUiPreferences.donePreCheck) {
logger.debug("Pre-check not done, checking");
if (BundledSoftware.getSoftwareStream() != null) {
logger.info("Extracting bundled software");
File installFolder = new File(ServiceRegistry.INSTANCE.getApi().getBaseFolder(), "ui" + separator + "3rdparty");
FileUtil.deleteRecursively(installFolder);
BundledSoftware.extract(installFolder.getParentFile());
Expand Down

0 comments on commit f479b36

Please sign in to comment.