diff --git a/__tests__/context.test.ts b/__tests__/context.test.ts index 46c5085..63b1a19 100644 --- a/__tests__/context.test.ts +++ b/__tests__/context.test.ts @@ -644,7 +644,7 @@ describe('flagMap', () => { expect(results).toEqual([ ['--catpants', 'a'], ['--catpants', 'b'], - ['--catpants', 'c'], + ['--catpants', 'c'] ]); }); }); diff --git a/src/context.ts b/src/context.ts index be5ebc1..6eb4ac9 100644 --- a/src/context.ts +++ b/src/context.ts @@ -88,12 +88,7 @@ export async function getInputs(defaultContext: string): Promise { } export async function getArgs(inputs: Inputs, defaultContext: string, buildxVersion: string): Promise> { - return [ - 'buildx', - ...await getBuildArgs(inputs, defaultContext, buildxVersion), - ...await getCommonArgs(inputs), - inputs.context, - ]; + return ['buildx', ...(await getBuildArgs(inputs, defaultContext, buildxVersion)), ...(await getCommonArgs(inputs)), inputs.context]; } async function getBuildArgs(inputs: Inputs, defaultContext: string, buildxVersion: string): Promise> { @@ -104,7 +99,7 @@ async function getBuildArgs(inputs: Inputs, defaultContext: string, buildxVersio ...flagMap(inputs.labels, '--label'), ...flagMap(inputs.outputs, '--output'), ...flagMap(inputs.tags, '--tag'), - ...flagMap(inputs.ssh, '--ssh'), + ...flagMap(inputs.ssh, '--ssh') ); if (inputs.target) {