Skip to content

Commit 2062999

Browse files
authored
Ignore spaces (#280)
1 parent 8b2e2d0 commit 2062999

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

azdo-task/DevcontainersCi/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function runMain(): Promise<void> {
6767
relativeConfigFile && path.resolve(checkoutPath, relativeConfigFile);
6868

6969
const resolvedImageTag = imageTag ?? 'latest';
70-
const imageTagArray = resolvedImageTag.split(',');
70+
const imageTagArray = resolvedImageTag.split(/\s*,\s*/);
7171
const fullImageNameArray: string[] = [];
7272
for (const tag of imageTagArray) {
7373
fullImageNameArray.push(`${imageName}:${tag}`);
@@ -255,7 +255,7 @@ export async function runPost(): Promise<void> {
255255
return;
256256
}
257257
const imageTag = task.getInput('imageTag') ?? 'latest';
258-
const imageTagArray = imageTag.split(',');
258+
const imageTagArray = imageTag.split(/\s*,\s*/);
259259
const platform = task.getInput('platform');
260260
if (platform) {
261261
for (const tag of imageTagArray) {

common/src/dev-container-cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ async function devContainerBuild(
178178
);
179179
}
180180
if (args.platform) {
181-
commandArgs.push('--platform', args.platform);
181+
commandArgs.push('--platform', args.platform.split(/\s*,\s*/).join(','));
182182
}
183183
if (args.output) {
184184
commandArgs.push('--output', args.output);

github-action/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export async function runMain(): Promise<void> {
7979
relativeConfigFile && path.resolve(checkoutPath, relativeConfigFile);
8080

8181
const resolvedImageTag = imageTag ?? 'latest';
82-
const imageTagArray = resolvedImageTag.split(',');
82+
const imageTagArray = resolvedImageTag.split(/\s*,\s*/);
8383
const fullImageNameArray: string[] = [];
8484
for (const tag of imageTagArray) {
8585
fullImageNameArray.push(`${imageName}:${tag}`);
@@ -256,7 +256,7 @@ export async function runPost(): Promise<void> {
256256

257257
const imageTag =
258258
emptyStringAsUndefined(core.getInput('imageTag')) ?? 'latest';
259-
const imageTagArray = imageTag.split(',');
259+
const imageTagArray = imageTag.split(/\s*,\s*/);
260260
if (!imageName) {
261261
if (pushOption) {
262262
// pushOption was set (and not to "never") - give an error that imageName is required

0 commit comments

Comments
 (0)