Skip to content

Commit

Permalink
preserve quotes surrounding fields in input list
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Oct 17, 2022
1 parent c74574e commit fe4c1ac
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
15 changes: 15 additions & 0 deletions __tests__/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,21 @@ describe('getCreateArgs', () => {
'tls://foo:1234'
]
],
[
5,
new Map<string, string>([
['install', 'false'],
['use', 'false'],
['driver-opts', `"env.no_proxy=localhost,127.0.0.1,.mydomain"`],
]),
[
'create',
'--name', 'builder-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d',
'--driver', 'docker-container',
'--driver-opt', '"env.no_proxy=localhost,127.0.0.1,.mydomain"',
'--buildkitd-flags', '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
]
],
])(
'[%d] given %p as inputs, returns %p',
async (num: number, inputs: Map<string, string>, expected: Array<string>) => {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ export async function getInputList(name: string, ignoreComma?: boolean): Promise
relaxQuotes: true,
comment: '#',
relaxColumnCount: true,
skipEmptyLines: true
skipEmptyLines: true,
quote: false
});

for (const record of records as Array<string[]>) {
Expand Down

0 comments on commit fe4c1ac

Please sign in to comment.