mirror of
https://github.com/go-gitea/gitea
synced 2025-08-15 14:08:28 +00:00
This commit is contained in:
@@ -128,7 +128,9 @@ func runDumpRepository(ctx *cli.Context) error {
|
||||
} else {
|
||||
units := strings.Split(ctx.String("units"), ",")
|
||||
for _, unit := range units {
|
||||
switch strings.ToLower(unit) {
|
||||
switch strings.ToLower(strings.TrimSpace(unit)) {
|
||||
case "":
|
||||
continue
|
||||
case "wiki":
|
||||
opts.Wiki = true
|
||||
case "issues":
|
||||
@@ -145,6 +147,8 @@ func runDumpRepository(ctx *cli.Context) error {
|
||||
opts.Comments = true
|
||||
case "pull_requests":
|
||||
opts.PullRequests = true
|
||||
default:
|
||||
return errors.New("invalid unit: " + unit)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user