mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
move calling main to front
This commit is contained in:
parent
0efa7810d2
commit
6e00d76396
2 changed files with 16 additions and 16 deletions
16
lib/index.js
16
lib/index.js
|
@ -586,6 +586,14 @@ __nccwpck_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
try {
|
||||
main();
|
||||
}
|
||||
catch (err) {
|
||||
if (err instanceof Error) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_2__.setFailed(err);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* main function
|
||||
*/
|
||||
|
@ -727,14 +735,6 @@ function shouldCreateKeyFile(keyFilePath, ifKeyExists) {
|
|||
throw new Error(`SSH key is already installed. Set "if_key_exists" to "replace" or "ignore" in order to avoid this error.`);
|
||||
}
|
||||
}
|
||||
try {
|
||||
main();
|
||||
}
|
||||
catch (err) {
|
||||
if (err instanceof Error) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_2__.setFailed(err);
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue