Skip to content

Commit e14a6f6

Browse files
committed
add nicer error message for missing tmux, fixes #229
1 parent 22e358f commit e14a6f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tmuxp/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import kaptan
1616
from click.exceptions import FileError
1717
from libtmux.common import has_required_tmux_version, which
18+
from libtmux.exc import TmuxCommandNotFound
1819
from libtmux.server import Server
1920

2021
from . import WorkspaceBuilder, config, exc, log, util
@@ -316,6 +317,9 @@ def cli(log_level):
316317
http://tmuxp.readthedocs.io/en/latest/"""
317318
try:
318319
has_required_tmux_version()
320+
except TmuxCommandNotFound:
321+
click.echo('tmux not found. tmuxp requires you install tmux first.')
322+
sys.exit()
319323
except exc.TmuxpException as e:
320324
click.echo(e, err=True)
321325
sys.exit()

0 commit comments

Comments
 (0)