浏览代码

fix(git-auto-fetch): avoid password prompt with `GIT_TERMINAL_PROMPT=0` (#11234)

Syphdias 1 年之前
父节点
当前提交
08d5c936c6
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      plugins/git-auto-fetch/git-auto-fetch.plugin.zsh

+ 1 - 0
plugins/git-auto-fetch/git-auto-fetch.plugin.zsh

@@ -28,6 +28,7 @@ function git-fetch-all {
     # Fetch all remotes (avoid ssh passphrase prompt)
     date -R &>! "$gitdir/FETCH_LOG"
     GIT_SSH_COMMAND="command ssh -o BatchMode=yes" \
+    GIT_TERMINAL_PROMPT=0 \
       command git fetch --all 2>/dev/null &>> "$gitdir/FETCH_LOG"
   ) &|
 }