]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-difftool--helper.sh
difftool--helper: exit when reading a prompt answer fails
[thirdparty/git.git] / git-difftool--helper.sh
index 7ef36b9482ccc4111f2c888bf5ccbaa2421a5875..aca0413c2840a3097056d6d247aad9438451249e 100755 (executable)
@@ -49,7 +49,8 @@ launch_merge_tool () {
                else
                        printf "Launch '%s' [Y/n]: " "$merge_tool"
                fi
-               if read ans && test "$ans" = n
+               read ans || return
+               if test "$ans" = n
                then
                        return
                fi