diff --git a/azdo-task/DevcontainersCi/src/main.ts b/azdo-task/DevcontainersCi/src/main.ts index e02ab6a4c..787871239 100644 --- a/azdo-task/DevcontainersCi/src/main.ts +++ b/azdo-task/DevcontainersCi/src/main.ts @@ -67,7 +67,7 @@ export async function runMain(): Promise { relativeConfigFile && path.resolve(checkoutPath, relativeConfigFile); const resolvedImageTag = imageTag ?? 'latest'; - const imageTagArray = resolvedImageTag.split(','); + const imageTagArray = resolvedImageTag.split(/\s*,\s*/); const fullImageNameArray: string[] = []; for (const tag of imageTagArray) { fullImageNameArray.push(`${imageName}:${tag}`); @@ -255,7 +255,7 @@ export async function runPost(): Promise { return; } const imageTag = task.getInput('imageTag') ?? 'latest'; - const imageTagArray = imageTag.split(','); + const imageTagArray = imageTag.split(/\s*,\s*/); const platform = task.getInput('platform'); if (platform) { for (const tag of imageTagArray) { diff --git a/common/src/dev-container-cli.ts b/common/src/dev-container-cli.ts index 6e1628207..a68a0323e 100644 --- a/common/src/dev-container-cli.ts +++ b/common/src/dev-container-cli.ts @@ -178,7 +178,7 @@ async function devContainerBuild( ); } if (args.platform) { - commandArgs.push('--platform', args.platform); + commandArgs.push('--platform', args.platform.split(/\s*,\s*/).join(',')); } if (args.output) { commandArgs.push('--output', args.output); diff --git a/github-action/src/main.ts b/github-action/src/main.ts index 2362fbf14..3e98d59d7 100644 --- a/github-action/src/main.ts +++ b/github-action/src/main.ts @@ -79,7 +79,7 @@ export async function runMain(): Promise { relativeConfigFile && path.resolve(checkoutPath, relativeConfigFile); const resolvedImageTag = imageTag ?? 'latest'; - const imageTagArray = resolvedImageTag.split(','); + const imageTagArray = resolvedImageTag.split(/\s*,\s*/); const fullImageNameArray: string[] = []; for (const tag of imageTagArray) { fullImageNameArray.push(`${imageName}:${tag}`); @@ -256,7 +256,7 @@ export async function runPost(): Promise { const imageTag = emptyStringAsUndefined(core.getInput('imageTag')) ?? 'latest'; - const imageTagArray = imageTag.split(','); + const imageTagArray = imageTag.split(/\s*,\s*/); if (!imageName) { if (pushOption) { // pushOption was set (and not to "never") - give an error that imageName is required