@ -16,6 +16,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/log"
packages_module "code.gitea.io/gitea/modules/packages"
packages_module "code.gitea.io/gitea/modules/packages"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/storage"
"code.gitea.io/gitea/modules/storage"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/modules/util"
)
)
@ -111,6 +112,10 @@ func checkStorage(opts *checkStorageOptions) func(ctx context.Context, logger lo
}
}
if opts . LFS || opts . All {
if opts . LFS || opts . All {
if ! setting . LFS . StartServer {
logger . Info ( "LFS isn't enabled (skipped)" )
return nil
}
if err := commonCheckStorage ( ctx , logger , autofix ,
if err := commonCheckStorage ( ctx , logger , autofix ,
& commonStorageCheckOptions {
& commonStorageCheckOptions {
storer : storage . LFS ,
storer : storage . LFS ,
@ -173,6 +178,10 @@ func checkStorage(opts *checkStorageOptions) func(ctx context.Context, logger lo
}
}
if opts . Packages || opts . All {
if opts . Packages || opts . All {
if ! setting . Packages . Enabled {
logger . Info ( "Packages isn't enabled (skipped)" )
return nil
}
if err := commonCheckStorage ( ctx , logger , autofix ,
if err := commonCheckStorage ( ctx , logger , autofix ,
& commonStorageCheckOptions {
& commonStorageCheckOptions {
storer : storage . Packages ,
storer : storage . Packages ,