From 7bcbd68068e0819cfe036891a94846967f1f8046 Mon Sep 17 00:00:00 2001 From: Aaron Brewbaker Date: Mon, 1 Jun 2026 22:56:53 -0400 Subject: [PATCH] fix: don't panic on unknown command with single arg (upstream bug) (#1) Co-authored-by: Aaron Brewbaker --- observe.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/observe.go b/observe.go index a19ab3b..a05782c 100644 --- a/observe.go +++ b/observe.go @@ -135,7 +135,11 @@ func RunCommandWithConfig(cfg *Config, fs fileSystem, op Output, args []string, } cmd := FindCommand(args[0]) if cmd == nil { - fmt.Fprintf(os.Stderr, "\nobserve: there is no command named %q for object type %s\n\n", args[0], args[1]) + if len(args) > 1 { + fmt.Fprintf(os.Stderr, "\nobserve: there is no command named %q for object type %s\n\n", args[0], args[1]) + } else { + fmt.Fprintf(os.Stderr, "\nobserve: there is no command named %q\n\n", args[0]) + } help() } var errors []string