Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
327185b6d8
commit
aba983b200
1 changed files with 4 additions and 1 deletions
|
|
@ -102,7 +102,10 @@ func NewExecToolWithConfig(workingDir string, restrict bool, config *config.Conf
|
|||
denyPatterns = append(denyPatterns, defaultDenyPatterns...)
|
||||
}
|
||||
|
||||
var allowPatterns []string = config.Agents.Defaults.AllowPatterns
|
||||
var allowPatterns []string
|
||||
if config != nil {
|
||||
allowPatterns = config.Agents.Defaults.AllowPatterns
|
||||
}
|
||||
var allowRegex []*regexp.Regexp
|
||||
if len(allowPatterns) > 0 {
|
||||
allowRegex = make([]*regexp.Regexp, 0, len(allowPatterns))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue