mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-19 06:00:40 -04:00
Merge pull request #76 from owncloud/die-on-missing-assets
Die on missing assets
This commit is contained in:
7
changelog/unreleased/exit-on-unresolved-assets.md
Normal file
7
changelog/unreleased/exit-on-unresolved-assets.md
Normal file
@@ -0,0 +1,7 @@
|
||||
Bugfix: exit when assets are not found
|
||||
|
||||
When a non-existing assets folders is specified, there was only a warning log statement and the service served
|
||||
the builtin assets instead. It is safe to exit the service in such a scenario, instead of serving other assets
|
||||
than specified. We changed the log level to `Fatal` on non-existing assets.
|
||||
|
||||
https://github.com/owncloud/ocis-phoenix/pull/76
|
||||
@@ -36,9 +36,9 @@ func (a assets) Open(original string) (http.File, error) {
|
||||
return f, nil
|
||||
}
|
||||
} else {
|
||||
a.logger.Warn().
|
||||
a.logger.Fatal().
|
||||
Str("path", a.config.Asset.Path).
|
||||
Msg("Assets directory doesn't exist")
|
||||
Msg("assets directory doesn't exist")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user