Skip to content

Commit

Permalink
Merge pull request #6032 from dantengsky/feat-dev-setup-jdk
Browse files Browse the repository at this point in the history
fix: add_profile should return 0 even if no items found in `~/.profile`
  • Loading branch information
dantengsky authored Jun 16, 2022
2 parents 20d731e + 75e5777 commit 8247768
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/setup/dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd "$SCRIPT_PATH/../.." || exit

function add_to_profile {
eval "$1"
FOUND=$(grep -c "$1" <"${HOME}/.profile")
FOUND=$(grep -c "$1" "${HOME}/.profile" || true)
if [ "$FOUND" == "0" ]; then
echo "$1" >>"${HOME}"/.profile
fi
Expand Down

0 comments on commit 8247768

Please sign in to comment.