Skip to content

Commit

Permalink
git-gui: Display message box when we cannot find git in $PATH
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce committed Sep 22, 2007
1 parent ae0754a commit 183a1d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,11 @@ proc rmsel_tag {text} {
set _git [_which git]
if {$_git eq {}} {
catch {wm withdraw .}
error_popup "Cannot find git in PATH."
tk_messageBox \
-icon error \
-type ok \
-title [mc "git-gui: fatal error"] \
-message [mc "Cannot find git in PATH."]
exit 1
}

Expand Down

0 comments on commit 183a1d1

Please sign in to comment.