From 661e2affcd6212ab65bf9996c2b95539d712528d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Wed, 16 Mar 2022 13:21:44 +0100 Subject: [PATCH] fix: use built in execSync options to fix cross-os issues (#26) --- dist/index.js | 2 +- find-successful-workflow.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2d9f89d..882666c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6479,7 +6479,7 @@ async function findExistingCommit(shas) { */ async function commitExists(commitSha) { try { - execSync(`git cat-file -e ${commitSha} 2> /dev/null`); + execSync(`git cat-file -e ${commitSha}`, { stdio: ['pipe', 'pipe', null] }); return true; } catch { return false; diff --git a/find-successful-workflow.js b/find-successful-workflow.js index ea9fc8c..7bccaac 100644 --- a/find-successful-workflow.js +++ b/find-successful-workflow.js @@ -115,7 +115,7 @@ async function findExistingCommit(shas) { */ async function commitExists(commitSha) { try { - execSync(`git cat-file -e ${commitSha} 2> /dev/null`); + execSync(`git cat-file -e ${commitSha}`, { stdio: ['pipe', 'pipe', null] }); return true; } catch { return false;