Fix type error in catch block

This commit is contained in:
Matteo Dell'Acqua 2023-05-22 17:05:57 +02:00
parent 1ff57057b5
commit a7a75759e9

View File

@ -128,7 +128,11 @@ async function run(): Promise<void> {
core.addPath(toolFolderPath)
core.debug(`Tool path added to PATH: ${toolFolderPath}`)
} catch (error) {
core.setFailed(error.message)
if (error instanceof Error) {
core.setFailed(error.message)
} else {
core.setFailed('Unknown error')
}
}
}