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.
This commit is contained in:
Willie
2026-03-06 02:15:36 +08:00
parent 1a4de5ddd1
commit 9a12df02b4
+6
View File
@@ -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)
}