Merge pull request #177 from github/delete-surplus-args

delete: reject positional arguments
This commit is contained in:
Alan Donovan 2021-09-21 09:26:22 -04:00 committed by GitHub
commit f33d430500

View file

@ -27,6 +27,9 @@ func newDeleteCmd() *cobra.Command {
Use: "delete",
Short: "Delete a codespace",
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
return fmt.Errorf("delete: unexpected positional arguments")
}
switch {
case allCodespaces && repo != "":
return errors.New("both --all and --repo is not supported")