Remove macos gnu tools check

This commit is contained in:
crschnick
2025-11-19 22:29:37 +00:00
parent fee3c8ca34
commit 91aed5fad2
4 changed files with 1 additions and 53 deletions
@@ -1,46 +0,0 @@
package io.xpipe.app.core.check;
import io.xpipe.app.core.AppNames;
import io.xpipe.app.issue.ErrorEventFactory;
import io.xpipe.app.process.LocalShell;
import io.xpipe.app.process.ShellDialects;
import io.xpipe.app.util.LocalExec;
import io.xpipe.core.FilePath;
import io.xpipe.core.OsType;
import java.util.Optional;
public class AppHomebrewCoreutilsCheck {
public static Optional<String> checkCoreutils() {
var r = LocalExec.readStdoutIfPossible("which", "stat");
if (r.isEmpty()) {
return Optional.empty();
}
var first = r.get().lines().findFirst();
return first.filter(s -> s.contains("coreutils"))
.map(s -> FilePath.of(s).getParent().toString());
}
public static void check() {
if (OsType.ofLocal() != OsType.MACOS) {
return;
}
if (LocalShell.getDialect() != ShellDialects.ZSH) {
return;
}
var loc = checkCoreutils();
if (loc.isPresent()) {
ErrorEventFactory.fromMessage("You have the homebrew coreutils package installed and added to your PATH at "
+ loc.get() + "."
+ " The coreutils commands overwrite and are incompatible to the native macOS commands, which "
+ AppNames.ofCurrent().getName() + " expects."
+ " Please remove the coreutils commands from your PATH prior to launching XPipe.")
.expected()
.handle();
}
}
}
@@ -29,11 +29,6 @@ public class AppShellCheck {
@Override
protected boolean fallBackInstantly() {
var coreutils = AppHomebrewCoreutilsCheck.checkCoreutils();
if (coreutils.isPresent()) {
return true;
}
return false;
}
};
@@ -67,7 +67,6 @@ public class AppBaseMode extends AppOperationMode {
AppPathCorruptCheck.check();
AppWindowsTempCheck.check();
AppDirectoryPermissionsCheck.checkDirectory(AppSystemInfo.ofCurrent().getTemp());
AppHomebrewCoreutilsCheck.check();
WindowsRegistry.init();
AppAvCheck.check();
AppJavaOptionsCheck.check();
@@ -38,7 +38,7 @@ public interface ShellDialect {
String queryVersion(ShellControl shellControl) throws Exception;
CommandControl queryFileSize(ShellControl shellControl, String file);
CommandControl queryFileSize(ShellControl shellControl, String file) throws Exception;
long queryDirectorySize(ShellControl shellControl, String file) throws Exception;