Skip to content

Commit

Permalink
Added check for config file
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>
  • Loading branch information
nspielbau committed Dec 14, 2023
1 parent f8b837f commit f93eaa9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions script/catmux_create_session
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,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 f93eaa9

Please sign in to comment.