diff --git a/lib/program.js b/lib/program.js index afefb7d..c80a00d 100644 --- a/lib/program.js +++ b/lib/program.js @@ -95,7 +95,7 @@ function Program(options) { if (!self.tmux) return 2; try { version = cp.execFileSync('tmux', ['-V'], { encoding: 'utf8' }); - return +/([\d.]+)/.exec(version)[1]; + return +/^tmux ([\d.]+)/i.exec(version.trim().split('\n')[0])[1]; } catch (e) { return 2; }