mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
fix(repo-config): avoid SIGSEGV if there is no .gitleaks.toml
This commit is contained in:
1 parent
6432f11a6b
commit
1f2d11003d
1 file changed
+1
-1
+1
-1
@@ -194,10 +194,10 @@ func (config *Config) updateFromRepo(repo *Repo) error {
|
||||
return err
|
||||
}
|
||||
f, err := wt.Filesystem.Open(".gitleaks.toml")
|
||||
defer f.Close()
|
||||
if err != nil {
|
||||
return fmt.Errorf("problem loading config: %v", err)
|
||||
}
|
||||
defer f.Close()
|
||||
if _, err := toml.DecodeReader(f, &tomlConfig); err != nil {
|
||||
return fmt.Errorf("problem loading config: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user