cmd as default windows terminal
This commit is contained in:
parent
1c24c84537
commit
bd94fc6dc3
@ -2138,21 +2138,8 @@ public class MainWindow extends JFrame {
|
||||
ProcessBuilder pb = null;
|
||||
|
||||
if (osName.contains("win")) {
|
||||
// Windows - try Windows Terminal first, then PowerShell, then cmd
|
||||
try {
|
||||
// Try to use Windows Terminal if available
|
||||
new ProcessBuilder("wt.exe", "-d", currentDir.getAbsolutePath()).start();
|
||||
return;
|
||||
} catch (Exception e1) {
|
||||
try {
|
||||
// Fallback to PowerShell
|
||||
new ProcessBuilder("powershell.exe").directory(currentDir).start();
|
||||
return;
|
||||
} catch (Exception e2) {
|
||||
// Final fallback to cmd
|
||||
// Windows - open cmd.exe
|
||||
pb = new ProcessBuilder("cmd.exe", "/c", "start", "cmd.exe");
|
||||
}
|
||||
}
|
||||
} else if (osName.contains("mac")) {
|
||||
// macOS
|
||||
pb = new ProcessBuilder("open", "-a", "Terminal", currentDir.getAbsolutePath());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user