mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 12:23:22 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user