Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavo committed Oct 4, 2023
1 parent fa17cf6 commit 6e3d465
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.fusesource.jansi.internal;

import java.util.Objects;

import org.fusesource.jansi.AnsiConsole;
import org.graalvm.nativeimage.hosted.Feature;
import org.graalvm.nativeimage.hosted.RuntimeClassInitialization;
Expand All @@ -40,9 +42,8 @@ public void duringSetup(DuringSetupAccess access) {
}
}

String provider = AnsiConsoleSupportHolder.getProviderName();

if (provider == null || provider.equals(AnsiConsole.JANSI_PROVIDER_JNI)) {
String provider = Objects.requireNonNull(AnsiConsoleSupportHolder.getProviderName(), "No provider available");
if (provider.equals(AnsiConsole.JANSI_PROVIDER_JNI)) {
String jansiNativeLibraryName = System.mapLibraryName("jansi");
if (jansiNativeLibraryName.endsWith(".dylib")) {
jansiNativeLibraryName = jansiNativeLibraryName.replace(".dylib", ".jnilib");
Expand Down

0 comments on commit 6e3d465

Please sign in to comment.