mirror of
https://github.com/openai/codex.git
synced 2026-09-17 12:23:33 +00:00
when a shell tool call invokes apply_patch, resolve relative paths against workdir, if specified
This commit is contained in:
@@ -11,7 +11,13 @@ describe("canAutoApprove()", () => {
|
||||
|
||||
const writeablePaths: Array<string> = [];
|
||||
const check = (command: ReadonlyArray<string>): SafetyAssessment =>
|
||||
canAutoApprove(command, "suggest", writeablePaths, env);
|
||||
canAutoApprove(
|
||||
command,
|
||||
/* workdir */ undefined,
|
||||
"suggest",
|
||||
writeablePaths,
|
||||
env,
|
||||
);
|
||||
|
||||
test("simple safe commands", () => {
|
||||
expect(check(["ls"])).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user