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

Fails on OS X Homebrew version of tmux #1

Closed
p7r opened this issue Jul 21, 2014 · 2 comments
Closed

Fails on OS X Homebrew version of tmux #1

p7r opened this issue Jul 21, 2014 · 2 comments

Comments

@p7r
Copy link

p7r commented Jul 21, 2014

So I cloned this and gave it a whirl and it blows up for me, because the latest version of tmux homebrew install is 1.9a and the version check doesn't like the 'a' in there.

# /usr/bin/python3 --version
Python 3.4.1
# uname -a
Darwin My-Mac-mini.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun  3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
# tmux -V
tmux 1.9a

Notice the "a" in the version.

# cd ~/code/tools/tmuxomatic 
# git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
# ls -l /usr/local/bin/tmuxomatic
lrwxr-xr-x  1 root  admin  44 21 Jul 16:01 /usr/local/bin/tmuxomatic -> ~/code/tools/tmuxomatic/tmuxomatic
# tmuxomatic -vvvv session_example
Traceback (most recent call last):
  File "/usr/local/bin/tmuxomatic", line 1333, in <module>
    main()
  File "/usr/local/bin/tmuxomatic", line 1209, in main
    for p, q in zip( version_listint(tmux_rep), version_listint(tmux_req) ):
  File "/usr/local/bin/tmuxomatic", line 1208, in <lambda>
    version_listint = lambda version_string: [int(x) for x in version_string.split(".")]
  File "/usr/local/bin/tmuxomatic", line 1208, in <listcomp>
    version_listint = lambda version_string: [int(x) for x in version_string.split(".")]
ValueError: invalid literal for int() with base 10: '9a'

A quick check of what that code is doing is trying to split the version number up and check the numerical value. I'd look for a way to do that that doesn't assume version numbers of tmux are always numeric/semantic for now.

So, old school way to fix this is to use the 1.9 branch, not 1.9a using homebrew...

# brew versions tmux
Warning: brew-versions is unsupported and may be removed soon.
Please use the homebrew-versions tap instead:
  https://github.com/Homebrew/homebrew-versions
1.9a     git checkout 29f9a44 /usr/local/Library/Formula/tmux.rb
1.9      git checkout fcb3161 /usr/local/Library/Formula/tmux.rb
1.8      git checkout c356bf7 /usr/local/Library/Formula/tmux.rb
1.7      git checkout 2de0838 /usr/local/Library/Formula/tmux.rb
1.6      git checkout f4a0f44 /usr/local/Library/Formula/tmux.rb
1.5      git checkout 1ffde14 /usr/local/Library/Formula/tmux.rb
1.4      git checkout 2e82661 /usr/local/Library/Formula/tmux.rb
1.3      git checkout 0a56d33 /usr/local/Library/Formula/tmux.rb
1.2      git checkout 585ee08 /usr/local/Library/Formula/tmux.rb
1.1      git checkout af6d133 /usr/local/Library/Formula/tmux.rb
1.0      git checkout a82e823 /usr/local/Library/Formula/tmux.rb
# cd $(brew --prefix)
# git checkout fcb3161 Library/Formula/tmux.rb
# brew install tmux
==> Downloading http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9.tar.gz
########################################################################     100.0%
==> ./configure --prefix=/usr/local/Cellar/tmux/1.9 --sysconfdir=/usr/local/etc
==> make install
==> Caveats
Example configurations have been installed to:
  /usr/local/Cellar/tmux/1.9/share/tmux/examples

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
/usr/local/Cellar/tmux/1.9: 15 files, 632K, built in 30 seconds
# tmux -V 
tmux 1.9
# cd ~/code/tools/tmuxomatic 
# tmuxomatic session_example 
[... now works fine... ]
@kmatt
Copy link
Contributor

kmatt commented Jul 21, 2014

Quick and dirty fix: #2

@oxidane
Copy link
Owner

oxidane commented Jul 21, 2014

Should be fixed now, thanks for the report and the quick fix.

@oxidane oxidane closed this as completed Jul 21, 2014
Farom pushed a commit to Farom/tmuxomatic that referenced this issue Oct 23, 2023
Remove deprecation warning on phyton 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants