fix(exec) fail close on invalid deny pattern (#781)

* fix(exec) fail close on invalid deny pattern

* fix: error check

* resolve conflicts
This commit is contained in:
Mauro authored and GitHub committed 2026-02-28 16:24:26 +08:00
1 parent 6c8866de6f
commit 172e6ebe5f
6 files changed
+77 -22

No files matched your search

+6 -1
View File
@@ -3,6 +3,7 @@ package gateway
import (
"context"
"fmt"
"log"
"os"
"os/signal"
"path/filepath"
@@ -223,7 +224,11 @@ func setupCronTool(
cronService := cron.NewCronService(cronStorePath, nil)
// Create and register CronTool
cronTool := tools.NewCronTool(cronService, agentLoop, msgBus, workspace, restrict, execTimeout, cfg)
cronTool, err := tools.NewCronTool(cronService, agentLoop, msgBus, workspace, restrict, execTimeout, cfg)
if err != nil {
log.Fatalf("Critical error during CronTool initialization: %v", err)
}
agentLoop.RegisterTool(cronTool)
// Set the onJob handler