cmd/update: stop Git's fsmonitor when needed
Git's fsmonitor daemon will prevent our update lock file from being released if it is running before a `brew update`. Let's fix that by stopping it whenever necessary so our update lock is released upon completion. Fixes #13521.
This commit is contained in:
parent
8a2efb1df6
commit
f9e8531924
@ -556,6 +556,12 @@ EOS
|
||||
[[ -d "${DIR}/.git" ]] || continue
|
||||
cd "${DIR}" || continue
|
||||
|
||||
# Git's fsmonitor daemon will not release our lock unless we stop it.
|
||||
if git fsmonitor--daemon status &>/dev/null
|
||||
then
|
||||
git fsmonitor--daemon stop 2>/dev/null
|
||||
fi
|
||||
|
||||
if ! git config --local --get remote.origin.url &>/dev/null
|
||||
then
|
||||
opoo "No remote 'origin' in ${DIR}, skipping update!"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user