Skip to content

Commit

Permalink
Fix an infinite loop in safe_install_dir.sh.
Browse files Browse the repository at this point in the history
`pwd -P` was returning `//some/path` and the condition
`[[ "${PWD}" == / ]]` would end up as `[[ // == / ]]` and get stuck.
  • Loading branch information
kyleneideck committed Mar 31, 2022
1 parent 8ddfb81 commit 6ef13ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BGMApp/BGMXPCHelper/safe_install_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ check_dir() {
[[ $((0$(stat -f '%Lp' .) & 0022)) -eq 0 ]]; do
# ...go upwards until we reach the root directory.
cd ..
if [[ "${PWD}" == / ]]; then
if [[ "${PWD}" -ef / ]]; then
DIR_IS_SAFE=1
break
fi
Expand Down

0 comments on commit 6ef13ed

Please sign in to comment.