Switch log level to Fatal when specified assets don't exist

If the service is started with an assets path and it doesn't exist, the
service should exit instead of just logging a warning and defaulting to
the builtin assets.
This commit is contained in:
Benedikt Kulmann
2020-08-13 12:44:43 +02:00
parent 30d77da6df
commit f52fbdf5ee

View File

@@ -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")
}
}