Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE on windows with missing jna/jansi (fixes #930) #933

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,11 @@ private Terminal doBuild() throws IOException {
}
}
}
if (terminal == null && OSUtils.IS_WINDOWS && !jna && !jansi && !jni && (dumb == null || !dumb)) {
throw new IllegalStateException("Unable to create a system terminal. On windows, either "
+ "JNA or JANSI library is required. Make sure to add one of those in the classpath.");
if (terminal == null && OSUtils.IS_WINDOWS && providers.isEmpty() && (dumb == null || !dumb)) {
throw new IllegalStateException(
"Unable to create a system terminal. On windows, either JLine's native libraries, JNA "
gnodet marked this conversation as resolved.
Show resolved Hide resolved
+ "or JANSI library is required. Make sure to add one of those in the classpath.",
gnodet marked this conversation as resolved.
Show resolved Hide resolved
exception);
}
}
if (terminal instanceof AbstractTerminal) {
Expand Down
Loading