improve version check.
This commit is contained in:
parent
211fcd3b4c
commit
6d163377ff
|
@ -95,7 +95,7 @@ function Program(options) {
|
||||||
if (!self.tmux) return 2;
|
if (!self.tmux) return 2;
|
||||||
try {
|
try {
|
||||||
version = cp.execFileSync('tmux', ['-V'], { encoding: 'utf8' });
|
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) {
|
} catch (e) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue