Skip to content

Commit

Permalink
fix: fix param not being relayed when image name is retried with suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
George Penkov committed Oct 20, 2021
1 parent 46c651c commit 71c71fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/aws.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ async function createImage(retryWithSuffix = false) {
return data.ImageId;
} catch (error) {
if (error.Code === 'InvalidAMIName.Duplicate' && !retryWithSuffix) {
createImage(true);
return;
return await createImage(true);
}
core.error('AWS EC2 AMI creation error');
throw error;
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {createImage, waitUntilImageIsReady} from './aws.mjs';
core.setOutput('ami-id', amiId);
core.endGroup();
if (wait) {
core.startGroup("Waiting for image to be ready")
core.startGroup("Waiting for image " + amiId + "to be ready")
await waitUntilImageIsReady(amiId);
core.endGroup();
}
Expand Down

0 comments on commit 71c71fd

Please sign in to comment.