Skip to content

Commit 87584e2

Browse files
author
Peter Steinberger
committed
test(cli): preserve secrets help fallback
1 parent 39abf13 commit 87584e2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎src/cli/secrets-cli.test.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,15 @@ describe("secrets CLI", () => {
553553
expect(runSecretsApply).not.toHaveBeenCalled();
554554
});
555555

556+
it("treats --help as the required --from value", async () => {
557+
await expect(
558+
createProgram().parseAsync(["secrets", "apply", "--from", "--help"], { from: "user" }),
559+
).rejects.toThrow("__exit__:1");
560+
561+
expect(runtimeErrors.join("\n")).toContain("Secrets plan file not found: --help");
562+
expect(runSecretsApply).not.toHaveBeenCalled();
563+
});
564+
556565
it("preserves causes for unrelated apply errors with a similar message", async () => {
557566
await withPlanFile(async (planPath) => {
558567
runSecretsApply.mockRejectedValueOnce(

0 commit comments

Comments
 (0)