Skip to content

Commit

Permalink
fix sed condition for shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed Sep 22, 2023
1 parent 1b10c14 commit 78f26f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions private/scripts/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 78f26f9

Please sign in to comment.