Skip to content

Commit 68f8ba0

Browse files
committed
Awaiting so catch should work.
1 parent a1de121 commit 68f8ba0

2 files changed

Lines changed: 22 additions & 14 deletions

File tree

build/index.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35228,14 +35228,18 @@ async function get_info() {
3522835228
core.info(`Connect: https://${region}.console.aws.amazon.com/systems-manager/session-manager/${instanceId}`);
3522935229
}
3523035230

35231-
try {
35232-
get_info();
35233-
} catch(error) {
35234-
// Not an error, as we don't want to fail a build on a non-aws builder.
35235-
core.info(`Get Instance failure`);
35236-
core.info(error.message);
35237-
//core.setFailed(error.message);
35231+
async function start() {
35232+
try {
35233+
await get_info();
35234+
} catch(error) {
35235+
// Not an error, as we don't want to fail a build on a non-aws builder.
35236+
core.info(`Get Instance failure`);
35237+
core.info(error.message);
35238+
//core.setFailed(error.message);
35239+
}
3523835240
}
35241+
35242+
start();
3523935243

3524035244
module.exports = __webpack_exports__;
3524135245
/******/ })()

src/main.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ async function get_info() {
1111
core.info(`Connect: https://${region}.console.aws.amazon.com/systems-manager/session-manager/${instanceId}`);
1212
}
1313

14-
try {
15-
get_info();
16-
} catch(error) {
17-
// Not an error, as we don't want to fail a build on a non-aws builder.
18-
core.info(`Get Instance failure`);
19-
core.info(error.message);
20-
//core.setFailed(error.message);
14+
async function start() {
15+
try {
16+
await get_info();
17+
} catch(error) {
18+
// Not an error, as we don't want to fail a build on a non-aws builder.
19+
core.info(`Get Instance failure`);
20+
core.info(error.message);
21+
//core.setFailed(error.message);
22+
}
2123
}
24+
25+
start();

0 commit comments

Comments
 (0)