mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 06:56:40 +01:00
chore: clean up linting configuration (#1343)
This commit is contained in:
@@ -75,9 +75,11 @@ func (cfg *Application) LoadAllValues(v *viper.Viper, configPath string) error {
|
||||
|
||||
// check if user specified config; otherwise read all possible paths
|
||||
if err := loadConfig(v, configPath); err != nil {
|
||||
if _, ok := err.(viper.ConfigFileNotFoundError); ok {
|
||||
// Not Found; ignore this error
|
||||
log.Debug("no config file found; proceeding with defaults")
|
||||
var notFound *viper.ConfigFileNotFoundError
|
||||
if errors.As(err, ¬Found) {
|
||||
log.Debugf("no config file found, using defaults")
|
||||
} else {
|
||||
return fmt.Errorf("unable to load config: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user