diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-01-20 18:00:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:00:38 +0100 |
commit | 1d98d205f5825f40110e6628b61a97c91ac7f72d (patch) | |
tree | 2326229027b9ba388732a912bff07ce4320aaf7c /modules/setting/mirror.go | |
parent | 16d378fefc0a569f2a7aed29e6c7f288b3d83f02 (diff) | |
download | gitea-1d98d205f5825f40110e6628b61a97c91ac7f72d.tar.gz gitea-1d98d205f5825f40110e6628b61a97c91ac7f72d.zip |
Enable deprecation error for v1.17.0 (#18341)
Co-authored-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/setting/mirror.go')
-rw-r--r-- | modules/setting/mirror.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/setting/mirror.go b/modules/setting/mirror.go index b0d5b2a4dc..e49393e39c 100644 --- a/modules/setting/mirror.go +++ b/modules/setting/mirror.go @@ -30,11 +30,12 @@ var ( func newMirror() { // Handle old configuration through `[repository]` `DISABLE_MIRRORS` // - please note this was badly named and only disabled the creation of new pull mirrors + // FIXME: DEPRECATED to be removed in v1.18.0 + deprecatedSetting("repository", "DISABLE_MIRRORS", "mirror", "ENABLED") if Cfg.Section("repository").Key("DISABLE_MIRRORS").MustBool(false) { - log.Warn("Deprecated DISABLE_MIRRORS config is used, please change your config and use the options within the [mirror] section") - // TODO: enable on v1.17.0: log.Error("Deprecated fallback used, will be removed in v1.18.0") Mirror.DisableNewPull = true } + if err := Cfg.Section("mirror").MapTo(&Mirror); err != nil { log.Fatal("Failed to map Mirror settings: %v", err) } |