fmauch / catmux

A python package that wraps launching applications with a tmux script
MIT License
74 stars 11 forks source link

Server exiting unexpectedly #35

Closed nspielbau closed 9 months ago

nspielbau commented 11 months ago

When starting a (fairly complex) session the catmux server seems to not come up correctly:

no server running on /tmp/tmux-1000/catmux
Using tmux config file: /home/USER/.local/lib/python3.8/site-packages/catmux/resources/share/catmux/tmux_default.conf
tmux -L catmux -f /home/USER/.local/lib/python3.8/site-packages/catmux/resources/share/catmux/tmux_default.conf new-session -s SESSIONNAME -d
Created session "SESSIONNAME"
server exited unexpectedly

Trying to start a session with the default tmux config does work somehow. When trying to start the complex session after the server is already running a session started with the default config it does not fail anymore.

This is currently reproducible on my machine, but I am not sure how I got here. Using Ubuntu 20.04.

nspielbau commented 10 months ago

After further investigation this is caused by the tmux config file path being wrong. Testing the config path on startup would add a meaningful error output

fmauch commented 10 months ago

An error output on a non-existing tmux config would indeed be nice. If you could implement this, this would be very welcome. Please also add a test for this.

nspielbau commented 10 months ago

Currently I only implemented a simple path.exists check which in itself I find it hard to find a test for. I could construct a helper function around the tmux_config selection which might lead to a more meaningful test case