Skip to content

Commit 9f05e1c

Browse files
committed
Wrap try catch
1 parent 1c84973 commit 9f05e1c

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

start.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,19 @@ const main = async () => {
5959
while (attempt < retry) {
6060
console.log('Push attempt ' + attempt + '...');
6161
++attempt;
62-
await exec('bash', [path.join(__dirname, './start.sh')], {
63-
env: {
64-
...process.env,
65-
INPUT_BRANCH: branch,
66-
INPUT_REPOSITORY: repository,
67-
INPUT_GITHUB_URL_PROTOCOL: github_url_protocol,
68-
INPUT_GITHUB_URL: github_url,
69-
}
70-
});
62+
try {
63+
await exec('bash', [path.join(__dirname, './start.sh')], {
64+
env: {
65+
...process.env,
66+
INPUT_BRANCH: branch,
67+
INPUT_REPOSITORY: repository,
68+
INPUT_GITHUB_URL_PROTOCOL: github_url_protocol,
69+
INPUT_GITHUB_URL: github_url,
70+
}
71+
});
72+
} catch (err) {
73+
console.error(err.toString());
74+
}
7175
}
7276
};
7377

0 commit comments

Comments
 (0)