Skip to content

Commit ddf5319

Browse files
committed
fix: remove unnecessary escape in regex pattern
1 parent 4ee5268 commit ddf5319

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/tools/bash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function validateScript(script: string, config: ToolConfiguration): BashToolResu
4444
}
4545

4646
// Detect redundant cd to working directory
47-
const cdPattern = /^\s*cd\s+['"]?([^'\";&|]+)['"]?\s*[;&|]/;
47+
const cdPattern = /^\s*cd\s+['"]?([^'";&|]+)['"]?\s*[;&|]/;
4848
const match = cdPattern.exec(script);
4949
if (match) {
5050
const targetPath = match[1].trim();

0 commit comments

Comments
 (0)