From 1548ba20b4cdca796f7d483e07887d4fbf2b3b46 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 6 Jan 2022 22:47:08 +0800 Subject: [PATCH] workflow: fix error catching --- scripts/prepublish.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepublish.mjs b/scripts/prepublish.mjs index daf5d7b6..b472c7f8 100644 --- a/scripts/prepublish.mjs +++ b/scripts/prepublish.mjs @@ -12,7 +12,7 @@ await $`git add -A .` try { await $`git commit -m "version ${version} snapshot"` } catch (e) { - if (!e.message.includes('nothing to commit')) { + if (!e.stdout.includes('nothing to commit')) { throw e } } -- 2.39.5