From 7b47f72e5ae5aa58cc49944a2f071ee98314bde4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Moravec?= Date: Wed, 21 Jul 2021 21:09:28 +0200 Subject: [PATCH] Fix handling validation errors from workflow dispatch When using unknown workflow dispatch with unknown argument, e.g. `/deploy test=4`, the error message is now: `Unexpected inputs provided: ["test"]`. This PR fixes it, because not the action fails and nothing is set as output. --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 393f14d..2c0efcf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -194,7 +194,7 @@ async function run(): Promise { const message: string = error.message // Handle validation errors from workflow dispatch if ( - message == 'Unexpected inputs provided' || + message.startsWith('Unexpected inputs provided') || (message.startsWith('Required input') && message.endsWith('not provided')) || message.startsWith('No ref found for:') ||