From 9a12df02b40830c996127732f0644ab93bbae040 Mon Sep 17 00:00:00 2001 From: Willie Date: Thu, 5 Mar 2026 23:26:37 +0800 Subject: [PATCH] fix(cli): restore argument validation for status --project mode The --json addition accidentally removed the guard that rejects unexpected positional arguments in project mode. Restore it so `skillshare status --project foo` correctly returns an error instead of silently ignoring the extra argument. --- cmd/skillshare/status.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/skillshare/status.go b/cmd/skillshare/status.go index 0e7f545c2..3a84b5f49 100644 --- a/cmd/skillshare/status.go +++ b/cmd/skillshare/status.go @@ -81,6 +81,12 @@ func cmdStatus(args []string) error { if jsonOutput { return fmt.Errorf("--json is not yet supported in project mode") } + // Reject unexpected positional arguments in project mode + for _, arg := range rest { + if arg != "--json" { + return fmt.Errorf("unexpected arguments: %v", rest) + } + } return cmdStatusProject(cwd) }