Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if Tmux is installed #229

Closed
sdouche opened this issue Mar 27, 2017 · 3 comments
Closed

Check if Tmux is installed #229

sdouche opened this issue Mar 27, 2017 · 3 comments

Comments

@sdouche
Copy link

@sdouche sdouche commented Mar 27, 2017

Hi,
Nasty error message if Tmux is not installed (version 1.2.7):

Exception for None -V: 
[Errno 2] No such file or directory: 'None'
Traceback (most recent call last):
  File "/home/sdouche/.pyenv/versions/vdefault/bin/tmuxp", line 11, in <module>
    sys.exit(cli.cli())
  File "/home/sdouche/.pyenv/versions/3.6.0/envs/vdefault/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/sdouche/.pyenv/versions/3.6.0/envs/vdefault/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/sdouche/.pyenv/versions/3.6.0/envs/vdefault/lib/python3.6/site-packages/click/core.py", line 1063, in invoke
    Command.invoke(self, ctx)
  File "/home/sdouche/.pyenv/versions/3.6.0/envs/vdefault/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/sdouche/.pyenv/versions/3.6.0/envs/vdefault/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/sdouche/.pyenv/versions/3.6.0/envs/vdefault/lib/python3.6/site-packages/tmuxp/cli.py", line 318, in cli
    has_required_tmux_version()
  File "/home/sdouche/.pyenv/versions/3.6.0/envs/vdefault/lib/python3.6/site-packages/libtmux/common.py", line 414, in has_required_tmux_version
    proc = tmux_cmd('-V')
  File "/home/sdouche/.pyenv/versions/3.6.0/envs/vdefault/lib/python3.6/site-packages/libtmux/common.py", line 178, in __init__
    self.stdout = console_to_str(stdout)
@tony
Copy link
Member

@tony tony commented Mar 29, 2017

Would you like to make a PR / test? This should be an easy one.

@tony
Copy link
Member

@tony tony commented Mar 29, 2017

I may take this one on if you don't have time.

What we need:

  1. libtmux to raise an exception (i.e. TmuxCommandNotFound) that tmux wasn't found in paths.
  2. tmuxp should give a friendlier error message when libtmux raises TmuxCommandNotFound
@tony tony closed this in e14a6f6 Apr 3, 2017
tony added a commit that referenced this issue Apr 3, 2017
@tony
Copy link
Member

@tony tony commented Apr 3, 2017

@sdouche This made it in v1.2.8. It's up on pip now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.