Skip to content

Commit

Permalink
Fix OS.exec, but no external behavior change.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Jan 20, 2023
1 parent 1f4c860 commit 385d94a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 DiffPlug
* Copyright (C) 2020-2023 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -153,7 +153,7 @@ private static OS calculateNative(Function<String, String> systemProperty, Funct

private static String exec(String... cmd) {
try {
Process process = Runtime.getRuntime().exec(new String[]{"uname", "-a"});
Process process = Runtime.getRuntime().exec(cmd);
ByteArrayOutputStream output = new ByteArrayOutputStream();
drain(process.getInputStream(), output);
return new String(output.toByteArray(), StandardCharsets.UTF_8);
Expand Down

0 comments on commit 385d94a

Please sign in to comment.