diff --git a/dist/index.js b/dist/index.js index d760b07..16640bf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -139,11 +139,9 @@ function run() { core.debug(`Tool path added to PATH: ${toolFolderPath}`); } catch (error) { - let errorMessage = 'Failed to do something exceptional'; if (error instanceof Error) { - errorMessage = error.message; + core.setFailed(error.message); } - console.log(errorMessage); } }); } diff --git a/src/main.ts b/src/main.ts index ed36f7d..9258848 100644 --- a/src/main.ts +++ b/src/main.ts @@ -129,11 +129,9 @@ async function run(): Promise { core.addPath(toolFolderPath) core.debug(`Tool path added to PATH: ${toolFolderPath}`) } catch (error) { - let errorMessage = 'Failed to do something exceptional' if (error instanceof Error) { - errorMessage = error.message + core.setFailed(error.message) } - console.log(errorMessage) } }