From 78f26f914614e302d0826d3b78ed2202a2c3d127 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Fri, 22 Sep 2023 15:22:40 -0600 Subject: [PATCH] fix sed condition for shellcheck --- private/scripts/helpers.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/private/scripts/helpers.sh b/private/scripts/helpers.sh index 5cf633be..665e1328 100755 --- a/private/scripts/helpers.sh +++ b/private/scripts/helpers.sh @@ -379,8 +379,7 @@ function update_composer() { # Linux sed -i "s,%sagedir%,$sagedir," composer.new.json fi - sed -i '' "s,%sagedir%,$sagedir," composer.new.json - if [ $? -ne 0 ]; then + if ! sed -i '' "s,%sagedir%,$sagedir," composer.new.json; then echo "${red}Failed to add post-install hook to composer.json. Exiting here.${normal}" exit 1; fi