mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-26 23:45:47 +00:00
Let mvnd -v show os name and arch
This commit is contained in:
@@ -123,7 +123,12 @@ public class DefaultClient implements Client {
|
||||
// Print version if needed
|
||||
if (version || showVersion || debug) {
|
||||
final String nativeSuffix = Environment.isNative() ? " (native)" : "";
|
||||
final String v = Ansi.ansi().bold().a("Maven Daemon " + buildProperties.getVersion() + nativeSuffix)
|
||||
final String v = Ansi.ansi().bold().a(
|
||||
"Maven Daemon "
|
||||
+ buildProperties.getVersion()
|
||||
+ "-" + buildProperties.getOsName()
|
||||
+ "-" + buildProperties.getOsArch()
|
||||
+ nativeSuffix)
|
||||
.reset().toString();
|
||||
output.accept(v);
|
||||
/*
|
||||
|
@@ -23,6 +23,7 @@ import java.io.InputStream;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Scanner;
|
||||
import org.slf4j.Logger;
|
||||
@@ -127,7 +128,7 @@ public class ScriptUtils {
|
||||
private static final boolean windows;
|
||||
|
||||
static {
|
||||
windows = System.getProperty("os.name").toLowerCase().contains("windows");
|
||||
windows = System.getProperty("os.name").toLowerCase(Locale.ROOT).startsWith("windows");
|
||||
}
|
||||
|
||||
public static boolean isWindows() {
|
||||
|
Reference in New Issue
Block a user