diff --git a/build/index.js b/build/index.js index 46041be..c546c21 100644 --- a/build/index.js +++ b/build/index.js @@ -4117,7 +4117,7 @@ async function diffAll(token, from, additionalArgs, headTag) { "--check", "--upload", ...(headTag ? ["--head-tag", headTag] : []), - ...(additionalArgs ? [additionalArgs] : []), + ...(additionalArgs ? [...additionalArgs.split(" ")] : []), ], { env: Object.assign(Object.assign({}, process.env), { OPTIC_TOKEN: token }), }, false); diff --git a/src/__tests__/action.test.ts b/src/__tests__/action.test.ts index 7cf65ea..a4b7c8b 100644 --- a/src/__tests__/action.test.ts +++ b/src/__tests__/action.test.ts @@ -95,10 +95,11 @@ test("push event with additional-args", async () => { const assertDeepen = mockDeepen(); const assertDiffAll = mockDiffAll("optic-token", "HEAD~1", false, [ "--fail-on-untracked-openapi", + "--generated", ]); const exitCode = await runAction("optic-token", "github-token", { - additionalArgs: "--fail-on-untracked-openapi", + additionalArgs: "--fail-on-untracked-openapi --generated", standardsFail: "true", eventName: "push", headRef: "refs/heads/main", diff --git a/src/action.ts b/src/action.ts index 1f4a6a4..f190f80 100644 --- a/src/action.ts +++ b/src/action.ts @@ -212,7 +212,7 @@ async function diffAll( "--check", "--upload", ...(headTag ? ["--head-tag", headTag] : []), - ...(additionalArgs ? [additionalArgs] : []), + ...(additionalArgs ? [...additionalArgs.split(" ")] : []), ], { env: {