Skip to content

Commit

Permalink
Added check for config file (#36)
Browse files Browse the repository at this point in the history
Script will exit if file is not present

Signed-off-by: Niklas Spielbauer <spielbauer@fzi.de>
Co-authored-by: Niklas Spielbauer <spielbauer@fzi.de>
  • Loading branch information
nspielbau and nspielbau authored Jan 29, 2024
1 parent 0b92567 commit 339927f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions catmux/catmux_create_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def main():
command = ["tmux", "-L", args.server_name]
if args.tmux_config:
tmux_config = args.tmux_config
if not os.path.exists(tmux_config):
print("Given tmux_config file does not exist")
sys.exit(1)
elif os.path.exists(os.path.expanduser("~/.tmux.conf")):
tmux_config = os.path.expanduser("~/.tmux.conf")
elif os.path.exists("/etc/tmux.conf"):
Expand Down

0 comments on commit 339927f

Please sign in to comment.