Skip to content

Commit 3b7c347

Browse files
committed
tweak: bash tool, ensure cat will trigger external_directory perm
1 parent 2e09d7d commit 3b7c347

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/opencode/src/tool/bash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const BashTool = Tool.define("bash", async () => {
108108
}
109109

110110
// not an exhaustive list, but covers most common cases
111-
if (["cd", "rm", "cp", "mv", "mkdir", "touch", "chmod", "chown"].includes(command[0])) {
111+
if (["cd", "rm", "cp", "mv", "mkdir", "touch", "chmod", "chown", "cat"].includes(command[0])) {
112112
for (const arg of command.slice(1)) {
113113
if (arg.startsWith("-") || (command[0] === "chmod" && arg.startsWith("+"))) continue
114114
const resolved = await $`realpath ${arg}`

0 commit comments

Comments
 (0)