From 6a3f0975dc26b07e2998337ef2f6213e702491c0 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 24 Feb 2026 01:19:58 +0000 Subject: [PATCH] chore: revert out-of-scope regex in shell.go to keep PR focused --- pkg/tools/shell.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/tools/shell.go b/pkg/tools/shell.go index 8ea0c9b78..a64bbf495 100644 --- a/pkg/tools/shell.go +++ b/pkg/tools/shell.go @@ -290,9 +290,8 @@ func (t *ExecTool) guardCommand(command, cwd string) string { return "" } - // Match absolute paths: Unix (starts with / after space/start/quotes/=/:) or Windows (X:\) - // This regex is careful not to match scoped packages like @mastra/core - pathPattern := regexp.MustCompile(`(?:\s|^|["'|&;=:])(/[^\s\"'|&;:]+)|([A-Za-z]:\\[^\\\"'|&;:]+)`) + // Match absolute paths: Unix (starts with /) or Windows (X:\) + pathPattern := regexp.MustCompile(`(?:\s|^|["'|&;])(/[^\s\"'|&;:]+)|([A-Za-z]:\\[^\\\"'|&;:]+)`) matches := pathPattern.FindAllStringSubmatch(cmd, -1) for _, match := range matches {