From 9720455de9087c19821b090890ffe06317a7d06e Mon Sep 17 00:00:00 2001 From: Phred Date: Fri, 6 Aug 2021 09:33:45 -0500 Subject: [PATCH] npm run format Signed-off-by: Phred --- __tests__/context.test.ts | 2 +- src/context.ts | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) 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) {