diff options
| author | Aiden Cline <[email protected]> | 2025-08-01 09:10:09 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-01 09:10:09 -0500 |
| commit | 4172e3ad2850249c606deb7b3c63c75702d5ad28 (patch) | |
| tree | f662c7a2af543d1c87fd89a6900feedde90450a8 | |
| parent | 90d1698aed2e9f0d27dbd6fb854ebcce7a06b9f5 (diff) | |
| download | opencode-4172e3ad2850249c606deb7b3c63c75702d5ad28.tar.gz opencode-4172e3ad2850249c606deb7b3c63c75702d5ad28.zip | |
fix: bash tool errors for chmod (#1502)
| -rw-r--r-- | packages/opencode/src/tool/bash.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/tool/bash.ts b/packages/opencode/src/tool/bash.ts index 896ec79bf..629201e37 100644 --- a/packages/opencode/src/tool/bash.ts +++ b/packages/opencode/src/tool/bash.ts @@ -74,7 +74,7 @@ export const BashTool = Tool.define("bash", { // not an exhaustive list, but covers most common cases if (["cd", "rm", "cp", "mv", "mkdir", "touch", "chmod", "chown"].includes(command[0])) { for (const arg of command.slice(1)) { - if (arg.startsWith("-")) continue + if (arg.startsWith("-") || (command[0] === "chmod" && arg.startsWith("+"))) continue const resolved = await $`realpath ${arg}`.text().then((x) => x.trim()) log.info("resolved path", { arg, resolved }) if (!Filesystem.contains(app.path.cwd, resolved)) { |
