Skip to content

Commit

Permalink
Ignore spaces (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti authored Mar 4, 2024
1 parent 8b2e2d0 commit 2062999
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions azdo-task/DevcontainersCi/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export async function runMain(): Promise<void> {
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}`);
Expand Down Expand Up @@ -255,7 +255,7 @@ export async function runPost(): Promise<void> {
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) {
Expand Down
2 changes: 1 addition & 1 deletion common/src/dev-container-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions github-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export async function runMain(): Promise<void> {
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}`);
Expand Down Expand Up @@ -256,7 +256,7 @@ export async function runPost(): Promise<void> {

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
Expand Down

0 comments on commit 2062999

Please sign in to comment.