From 7fb67affef2535306ad703bd679b293a80d52258 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Mon, 11 Dec 2023 12:28:06 +0100 Subject: [PATCH] chore: use brew prefix instead of hardcoded path --- publish.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/publish.sh b/publish.sh index c42cf650..d6ab37ce 100755 --- a/publish.sh +++ b/publish.sh @@ -12,8 +12,8 @@ from_linux=eclipse-temurin-11 pattern="# common for all images" # we need gnu-sed on macos -if [ -d /opt/homebrew/opt/gnu-sed/libexec/gnubin ]; then - PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" +if prefix="$(brew --prefix gnu-sed 2>&1)" && [ -d "${prefix}/libexec/gnubin" ]; then + PATH="${prefix}/libexec/gnubin:$PATH" fi for dir in "${all_dirs[@]}"; do