mirror of
https://github.com/filebrowser/filebrowser
synced 2026-04-21 13:27:17 +00:00
fix: properly surface config parse errors (#5822)
This commit is contained in:
parent
0542fc0ba4
commit
ef2e9992dc
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue