office: every subcommand answers --help, and delete refuses a system folder like /tmp or /home

This commit is contained in:
Sam
2026-11-13 17:27:14 +11:00
parent 0717697f03
commit 33a06da232
7 changed files with 23 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ def exists(root):
def load(root):
p = path(root)
if not os.path.isfile(p):
raise h.Refused(2, "no %s here; run bin/office %s first" % (REL, root))
raise h.Refused(2, "no %s here; run: office %s" % (REL, root))
with open(p, "rb") as f:
return tomllib.load(f)