()
| 36 | } |
| 37 | |
| 38 | function isTmuxAvailable(): boolean { |
| 39 | if (process.env.CI === 'true' || process.env.CI === '1') return false |
| 40 | try { |
| 41 | execSync( |
| 42 | 'which tmux && tmux new-session -d -s __freebuff_tmux_check__ && tmux kill-session -t __freebuff_tmux_check__', |
| 43 | { stdio: 'pipe', timeout: 5000 }, |
| 44 | ) |
| 45 | return true |
| 46 | } catch { |
| 47 | return false |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | function tmux(args: string[]): Promise<string> { |
| 52 | return new Promise((resolve, reject) => { |