Fix tmux detection for non-POSIX shells (#1030)

This commit is contained in:
ZacharyZcR
2026-07-13 22:59:42 +08:00
committed by GitHub
parent 1c18620629
commit 6f6908bdf4
3 changed files with 40 additions and 7 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ import {
} from "../utils/socks5-helper.js";
import { withConnection } from "./ssh-connection-pool.js";
import { resolveSshConnectConfigHost } from "./ssh-dns.js";
import { execCommand, tmuxCommand, withTmuxPath } from "./tmux-helper.js";
import { execCommand, tmuxCommand } from "./tmux-helper.js";
import {
SEP,
parseSessions,
@@ -246,7 +246,7 @@ async function withHostConnection<T>(
async function tmuxAvailable(conn: Client): Promise<boolean> {
try {
await execCommand(conn, withTmuxPath("command -v tmux"));
await execCommand(conn, tmuxCommand("-V"));
return true;
} catch {
return false;