Update src/permissions/permissionChecker.ts

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
Nate Sesti 2025-07-27 19:56:01 -07:00 • committed by GitHub
parent 85a19c81f7
commit b97f786baa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,7 +77,7 @@ export function matchesArguments(
// Handle glob patterns with wildcards (only for string patterns)
if (typeof pattern === "string" && (pattern.includes("*") || pattern.includes("?"))) {
// Convert argValue to string for pattern matching
const stringValue = String(argValue || "");
const stringValue = String(argValue ?? "");
// Escape all regex metacharacters except * and ?
const escaped = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&");