@matheusbsbs / matheus-bagliano / commits / 183a1d1496
Fork 0

git-gui: Display message box when we cannot find git in $PATH

If we cannot find the git executable in the user's $PATH then we cannot function correctly. Because we need that to get the version so we can load our library correctly we cannot rely on the library function "error_popup" here, as this is all running before the library path has been configured, so error_popup is not available to us. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Sep 21, 2007 at 10:58 UTC 183a1d1496921e16d316ac523146385af39fcdb0
1 file changed +5 -1
git-gui.sh
+5 -1
@@ -498,7 +498,11 @@ proc rmsel_tag {text} {
498 set _git [_which git]
499 if {$_git eq {}} {
500 catch {wm withdraw .}
501 - error_popup "Cannot find git in PATH."
501 + tk_messageBox \
502 + -icon error \
503 + -type ok \
504 + -title [mc "git-gui: fatal error"] \
505 + -message [mc "Cannot find git in PATH."]
506 exit 1
507 }
508