Hi,
Your regex does not support the new beta versions of XQuartz, which you are automatically prompted to install through XQuartz auto-update (why would they roll-out beta releases??).
final ProcessBuilder builder =
new ProcessBuilder("mdls", "-name", "kMDItemVersion", "/Applications/Utilities/XQuartz.app");
try {
final Process process = builder.start();
// check if output of process was a valid version
final BufferedReader stdout = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line;
while ((line = stdout.readLine()) != null) {
if (line.matches("kMDItemVersion = \"2(?:\\.[0-9]+)+\"")) {
quartzFound = true;
}
}
try {
process.waitFor();
} catch (final InterruptedException e) {
// happens when user cancels node at this point for example
LOGGER.debug("Interrupted while waiting for mdls process to terminate.", e);
}
the new line is:
> $ mdls -name kMDItemVersion /Applications/Utilities/XQuartz.app
kMDItemVersion = "2.8.0_beta1"
Fortunately, I could edit XQuartz’s version in the plist so I do not have to downgrade.
1 Like
system
Closed
February 10, 2021, 3:40pm
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.