Merge a8783b25cb into sapling-pr-archive-bolinfest
This commit is contained in:
Vendored
+4
-3
File diff suppressed because one or more lines are too long
+3
-2
@@ -150,9 +150,10 @@ export async function main() {
|
||||
"--sandbox <SANDBOX>",
|
||||
"Legacy sandbox mode override to pass to `codex exec` (may be empty)."
|
||||
)
|
||||
.requiredOption(
|
||||
.option(
|
||||
"--permission-profile <PROFILE>",
|
||||
"Permission profile to select through `default_permissions` (may be empty)."
|
||||
"Permission profile to select through `default_permissions` (may be empty).",
|
||||
""
|
||||
)
|
||||
.requiredOption("--model <model>", "Model the agent should use")
|
||||
.requiredOption("--effort <effort>", "Reasoning effort the agent should use")
|
||||
|
||||
@@ -79,8 +79,9 @@ writeFileSync(args[outputIndex + 1], "fake final message\\n");
|
||||
"",
|
||||
"--sandbox",
|
||||
sandbox,
|
||||
"--permission-profile",
|
||||
permissionProfile,
|
||||
...(permissionProfile == null
|
||||
? []
|
||||
: ["--permission-profile", permissionProfile]),
|
||||
"--model",
|
||||
"",
|
||||
"--effort",
|
||||
@@ -117,6 +118,15 @@ test("preserves workspace-write as the default legacy sandbox", () => {
|
||||
assert.deepEqual(capturedArgs.slice(-2), ["--sandbox", "workspace-write"]);
|
||||
});
|
||||
|
||||
test("allows permission-profile to be omitted", () => {
|
||||
const { result, capturedArgs } = runCodexExecWithFakeCodex({
|
||||
permissionProfile: null,
|
||||
});
|
||||
|
||||
assert.equal(result.status, 0, result.stderr);
|
||||
assert.deepEqual(capturedArgs.slice(-2), ["--sandbox", "workspace-write"]);
|
||||
});
|
||||
|
||||
test("selects a permission profile without passing --sandbox", () => {
|
||||
const { result, capturedArgs } = runCodexExecWithFakeCodex({
|
||||
permissionProfile: "public-review",
|
||||
|
||||
Reference in New Issue
Block a user