mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix: address verified review findings (cli-core-1)
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
12 files changed
+181
-21
No files matched your search
@@ -277,7 +277,10 @@ $ tea branch protect --pattern 'release/*' --allow-push acme/release`,
|
||||
Annotations: textOutput("branch protect does not return a resource"),
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
if pattern != "" {
|
||||
return usageArgs(cobra.NoArgs)(cmd, args)
|
||||
if len(args) > 0 {
|
||||
return clierr.Wrap(clierr.Usage, &argumentError{problem: "--pattern cannot be combined with branch names", cmd: cmd})
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return usageArgs(cobra.MinimumNArgs(1))(cmd, args)
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user