mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
FIx macOS fallback shell triggering too often
This commit is contained in:
parent
c2427da60d
commit
2db320e1bd
2 changed files with 10 additions and 1 deletions
|
@ -15,9 +15,11 @@ public class AppShellCheck {
|
|||
public static void check() throws Exception {
|
||||
var err = selfTestErrorCheck();
|
||||
|
||||
// We don't want to fall back on macOS as occasional zsh spawn issues would cause many users to use sh
|
||||
var canFallback = !ProcessControlProvider.get()
|
||||
.getEffectiveLocalDialect()
|
||||
.equals(ProcessControlProvider.get().getFallbackDialect());
|
||||
.equals(ProcessControlProvider.get().getFallbackDialect()) &&
|
||||
OsType.getLocal() != OsType.MACOS;
|
||||
if (err.isPresent() && canFallback) {
|
||||
var msg = formatMessage(err.get().getMessage());
|
||||
ErrorEvent.fromThrowable(new IllegalStateException(msg)).handle();
|
||||
|
|
|
@ -10,6 +10,8 @@ import io.xpipe.app.storage.DataStorage;
|
|||
import io.xpipe.app.terminal.ExternalTerminalType;
|
||||
import io.xpipe.app.update.XPipeDistributionType;
|
||||
import io.xpipe.app.util.PasswordLockSecretValue;
|
||||
import io.xpipe.app.util.XPipeSession;
|
||||
import io.xpipe.core.process.OsType;
|
||||
import io.xpipe.core.util.InPlaceSecretValue;
|
||||
import io.xpipe.core.util.ModuleHelper;
|
||||
|
||||
|
@ -518,6 +520,11 @@ public class AppPrefs {
|
|||
storageDirectory.setValue(DEFAULT_STORAGE_DIR);
|
||||
}
|
||||
|
||||
// Fix erroneous fallback shell set on macOS
|
||||
if (OsType.getLocal() == OsType.MACOS && AppProperties.get().getVersion().equals("12.1.1") && XPipeSession.get().isNewBuildSession()) {
|
||||
useLocalFallbackShell.setValue(false);
|
||||
}
|
||||
|
||||
try {
|
||||
FileUtils.forceMkdir(storageDirectory.getValue().toFile());
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in a new issue