From c9589d1941a639f9a0d15b58ea4598087e4e4bbd Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 23 May 2021 02:41:02 +0200 Subject: [PATCH] Preserve quotes inside unquoted field Signed-off-by: CrazyMax --- __tests__/context.test.ts | 16 ++++++++++++++++ dist/index.js | 1 + src/context.ts | 1 + 3 files changed, 18 insertions(+) diff --git a/__tests__/context.test.ts b/__tests__/context.test.ts index 55669db..9ab04d1 100644 --- a/__tests__/context.test.ts +++ b/__tests__/context.test.ts @@ -361,6 +361,22 @@ ccc`], '--push', 'https://github.com/docker/build-push-action.git#heads/master' ] + ], + [ + '0.4.2', + new Map([ + ['context', '.'], + ['labels', 'org.opencontainers.image.title=filter_results_top_n\norg.opencontainers.image.description=Reference implementation of operation "filter results (top-n)"'], + ['outputs', 'type=local,dest=./release-out'] + ]), + [ + 'buildx', + 'build', + '--label', 'org.opencontainers.image.title=filter_results_top_n', + '--label', 'org.opencontainers.image.description=Reference implementation of operation "filter results (top-n)"', + '--output', 'type=local,dest=./release-out', + '.' + ] ] ])( 'given %p with %p as inputs, returns %p', diff --git a/dist/index.js b/dist/index.js index 8a396c6..2d5b813 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13485,6 +13485,7 @@ function getInputList(name, ignoreComma) { } for (let output of (yield sync_1.default(items, { columns: false, + relax: true, relaxColumnCount: true, skipLinesWithEmptyValues: true }))) { diff --git a/src/context.ts b/src/context.ts index 9876fec..94204e1 100644 --- a/src/context.ts +++ b/src/context.ts @@ -185,6 +185,7 @@ export async function getInputList(name: string, ignoreComma?: boolean): Promise for (let output of (await csvparse(items, { columns: false, + relax: true, relaxColumnCount: true, skipLinesWithEmptyValues: true })) as Array) {