mirror of
https://gitee.com/mirrors/ohmyzsh.git
synced 2026-10-13 19:34:22 +08:00
fix(git-auto-fetch): cancel fetch if we don't have permission over git folder (#10010)
This commit is contained in:
1 parent
5a4159cd29
commit
ab8b9913cb
1 file changed
+3
-2
@@ -11,8 +11,9 @@ function git-fetch-all {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Do nothing if auto-fetch disabled
|
# Do nothing if auto-fetch is disabled or don't have permissions
|
||||||
if [[ -z "$gitdir" || -f "$gitdir/NO_AUTO_FETCH" ]]; then
|
if [[ ! -w "$gitdir" || -f "$gitdir/NO_AUTO_FETCH" ]] ||
|
||||||
|
[[ -f "$gitdir/FETCH_LOG" && ! -w "$gitdir/FETCH_LOG" ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user