mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-10 19:16:20 +00:00
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…
x
Reference in New Issue
Block a user