From 8bc87a4b74de40d9ca7bb047087f5c577e891ab8 Mon Sep 17 00:00:00 2001 From: Nathan Thomas Date: Sat, 13 Jan 2024 22:49:07 -0800 Subject: [PATCH] Use default launcher if vim not found (#559) --- streamrip/rip/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/streamrip/rip/cli.py b/streamrip/rip/cli.py index 2d70990..1e46718 100644 --- a/streamrip/rip/cli.py +++ b/streamrip/rip/cli.py @@ -222,8 +222,11 @@ def config_open(ctx, vim): if vim: if shutil.which("nvim") is not None: subprocess.run(["nvim", config_path]) - else: + elif shutil.which("vim") is not None: subprocess.run(["vim", config_path]) + else: + logger.error("Could not find nvim or vim. Using default launcher.") + click.launch(config_path) else: click.launch(config_path)