improve version check.

This commit is contained in:
Christopher Jeffrey 2015-07-19 05:20:11 -07:00
parent 211fcd3b4c
commit 6d163377ff
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}