From fd381ade05e66a94f29a64965db20be625a7cf97 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Mon, 11 Mar 2024 15:37:39 +0100 Subject: [PATCH 1/2] 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): From cba77083c382a02054c0c4d0830a8a64827c13d9 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Mon, 11 Mar 2024 16:35:03 +0100 Subject: [PATCH 2/2] Print a message when SBY is waiting for a config on stdin --- sbysrc/sby.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbysrc/sby.py b/sbysrc/sby.py index e781d6d..c21ab0b 100644 --- a/sbysrc/sby.py +++ b/sbysrc/sby.py @@ -297,6 +297,8 @@ def read_sbyconfig(sbydata, taskname): sbydata = list() +if sbyfile is None: + print("Reading .sby configuration from stdin:") with (open(sbyfile, "r") if sbyfile is not None else sys.stdin) as f: for line in f: sbydata.append(line)