From 4e9dc7e046c7b099ec8ae77eb5261e32d224b5c4 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 24 Jan 2022 12:22:04 +0100 Subject: [PATCH] Merge bitcoin/bitcoin#23543: test: Prevent non-compatible sed binary for scripted-diffs d8dfc403f74858b79c87f650b5d609aa60a4dc3b script: redirecting stderr to stdout before pipelining into grep (anouar kappitou) 30df5c3dd4d39d9027b0341d01d3233400104893 script: preventing non-compatible sed binary. (anouar kappitou) Pull request description: This Pull request improve scripted diff by checking for non-compatible sed binary. Fixes #19815 ACKs for top commit: shaavan: reACK d8dfc403f74858b79c87f650b5d609aa60a4dc3b theStack: Tested ACK d8dfc403f74858b79c87f650b5d609aa60a4dc3b Tree-SHA512: 4813abb02195e04b8953662e51cba4599789e6185a6d384f56255e2d37c2b16be46c7c8861e44ba1a13d42573a58eb708901472925cb308dba2f602020e9f0f6 --- test/lint/commit-script-check.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/lint/commit-script-check.sh b/test/lint/commit-script-check.sh index 52233a2d7a..277512c72a 100755 --- a/test/lint/commit-script-check.sh +++ b/test/lint/commit-script-check.sh @@ -17,6 +17,11 @@ if test -z "$1"; then exit 1 fi +if ! sed --help 2>&1 | grep -q 'GNU'; then + echo "Error: the installed sed package is not compatible. Please make sure you have GNU sed installed in your system."; + exit 1; +fi + RET=0 PREV_BRANCH=$(git name-rev --name-only HEAD) PREV_HEAD=$(git rev-parse HEAD)