File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,20 @@ import fs from 'fs'
33import path from 'path'
44
55/**
6- * Check if tmux is available on the system
6+ * Check if tmux is available and usable on the system.
7+ * This checks both that tmux is installed AND that it can actually run
8+ * (e.g., the tmux server socket directory exists and is accessible).
79 */
810export function isTmuxAvailable ( ) : boolean {
911 try {
12+ // First check if tmux is installed
1013 execSync ( 'which tmux' , { stdio : 'pipe' } )
14+ // Then verify tmux can actually run by creating and killing a test session
15+ // This will fail if tmux server can't start (e.g., no socket directory on CI)
16+ execSync ( 'tmux new-session -d -s __codebuff_tmux_check__ && tmux kill-session -t __codebuff_tmux_check__' , {
17+ stdio : 'pipe' ,
18+ timeout : 5000 ,
19+ } )
1120 return true
1221 } catch {
1322 return false
You can’t perform that action at this time.
0 commit comments