From fd381ade05e66a94f29a64965db20be625a7cf97 Mon Sep 17 00:00:00 2001
From: Jannis Harder <me@jix.one>
Date: Mon, 11 Mar 2024 15:37:39 +0100
Subject: [PATCH] Print an error message when using "--status" with no project
 specified

---
 sbysrc/sby.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sbysrc/sby.py b/sbysrc/sby.py
index 99dcc6c..e781d6d 100644
--- a/sbysrc/sby.py
+++ b/sbysrc/sby.py
@@ -61,6 +61,9 @@ status_reset = args.status_reset
 
 if status_show or status_reset:
     target = workdir_prefix or workdir or sbyfile
+    if target is None:
+        print("ERROR: Specify a .sby config file or working directory to use --status.")
+        sys.exit(1)
     if not os.path.isdir(target) and target.endswith('.sby'):
         target = target[:-4]
     if not os.path.isdir(target):