From f93eaa9189bd7483082137ebbc2b5253ae0b426d Mon Sep 17 00:00:00 2001 From: Niklas Spielbauer Date: Thu, 14 Dec 2023 12:11:04 +0100 Subject: [PATCH] Added check for config file Script will exit if file is not present Signed-off-by: Niklas Spielbauer --- script/catmux_create_session | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/catmux_create_session b/script/catmux_create_session index 6fed047..ab6b091 100755 --- a/script/catmux_create_session +++ b/script/catmux_create_session @@ -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"):