aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-07-01 15:47:44 +0800
committerGitHub <noreply@github.com>2022-07-01 15:47:44 +0800
commit7c1f18a2bb409e2ed669c5e0e6ef8abc9e1a534b (patch)
treecaaed0b4fc68cf6ad13fa32e2f900cce72a608d5 /services
parent2eb713bacc202662c875e48c1954e3dd0b73c7b3 (diff)
downloadgitea-7c1f18a2bb409e2ed669c5e0e6ef8abc9e1a534b.tar.gz
gitea-7c1f18a2bb409e2ed669c5e0e6ef8abc9e1a534b.zip
Fix cli command restore-repo: "units" should be splitted to string slice, to match the old behavior and match the dump-repo's behavior (#20183)
Diffstat (limited to 'services')
-rw-r--r--services/migrations/dump.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/migrations/dump.go b/services/migrations/dump.go
index 21d03b333f..a9ec459519 100644
--- a/services/migrations/dump.go
+++ b/services/migrations/dump.go
@@ -590,7 +590,7 @@ func updateOptionsUnits(opts *base.MigrateOptions, units []string) error {
opts.ReleaseAssets = true
} else {
for _, unit := range units {
- switch strings.ToLower(unit) {
+ switch strings.ToLower(strings.TrimSpace(unit)) {
case "":
continue
case "wiki":