tweak: bash tool, ensure cat will trigger external_directory perm
This commit is contained in:
parent
2e09d7d835
commit
3b7c347b2e
1 changed files with 1 additions and 1 deletions
|
|
@ -108,7 +108,7 @@ export const BashTool = Tool.define("bash", async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// not an exhaustive list, but covers most common cases
|
// not an exhaustive list, but covers most common cases
|
||||||
if (["cd", "rm", "cp", "mv", "mkdir", "touch", "chmod", "chown"].includes(command[0])) {
|
if (["cd", "rm", "cp", "mv", "mkdir", "touch", "chmod", "chown", "cat"].includes(command[0])) {
|
||||||
for (const arg of command.slice(1)) {
|
for (const arg of command.slice(1)) {
|
||||||
if (arg.startsWith("-") || (command[0] === "chmod" && arg.startsWith("+"))) continue
|
if (arg.startsWith("-") || (command[0] === "chmod" && arg.startsWith("+"))) continue
|
||||||
const resolved = await $`realpath ${arg}`
|
const resolved = await $`realpath ${arg}`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue