From 9db91442b34e8f63bee2d3eab2e5c7cbf71e7572 Mon Sep 17 00:00:00 2001 From: Zachary Rice Date: Sat, 4 Apr 2020 14:49:54 -0400 Subject: [PATCH] ignoring config when using custom config (#362) --- config/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/config.go b/config/config.go index 0e64926e..4ebac4f7 100644 --- a/config/config.go +++ b/config/config.go @@ -2,6 +2,7 @@ package config import ( "fmt" + "path" "regexp" "strconv" @@ -94,6 +95,8 @@ func NewConfig(options options.Options) (Config, error) { var err error if options.Config != "" { _, err = toml.DecodeFile(options.Config, &tomlLoader) + // append a whitelist rule for whitelisting the config + tomlLoader.Whitelist.Files = append(tomlLoader.Whitelist.Files, path.Base(options.Config)) } else { _, err = toml.Decode(DefaultConfig, &tomlLoader) }