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 gradle command execution on Oshi 6.x #922

Merged
merged 3 commits into from
Oct 19, 2022
Merged

Conversation

imbyungjun
Copy link
Contributor

Recently, nGrinder bumps Oshi from 5.2.2 to 6.1.6.
And Oshi changes the runNative() method to pass environment variables.
runNative() method is a wrapper of Runtime.getRuntime().exec() that captures the output in a list.

public static List<String> runNative(String[] cmdToRunWithArgs) {
    return runNative(cmdToRunWithArgs, DEFAULT_ENV); // DEFAULT_ENV == "LC_ALL=C"
}

This change makes executing gradle goes wrong. So, I changed to pass nothing as environment variable.

@imbyungjun imbyungjun self-assigned this Oct 19, 2022
@github-actions
Copy link

✅ Build & Test workflow succeed ✅

@@ -87,7 +87,7 @@ protected boolean isSuccess(List<String> results) {
if (results.isEmpty()) {
return false;
}
return results.stream().noneMatch(str -> str.contains("FAILED"));
return results.stream().noneMatch(str -> str.contains("FAILED") || str.contains("ERROR"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@imbyungjun imbyungjun merged commit d511f30 into develop Oct 19, 2022
@imbyungjun imbyungjun deleted the hotfix/oshi-gradle branch October 19, 2022 06:12
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.

2 participants