mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-04-17 11:35:06 +00:00
fix: properly surface config parse errors (#5822)
This commit is contained in:
@@ -118,7 +118,8 @@ func initViper(cmd *cobra.Command) (*viper.Viper, error) {
|
||||
|
||||
// Read in configuration
|
||||
if err := v.ReadInConfig(); err != nil {
|
||||
if errors.Is(err, viper.ConfigParseError{}) {
|
||||
|
||||
if errors.As(err, &viper.ConfigParseError{}) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user