# Re: Relating to some syntax error in the gitk script

2 messages from 2007-09-27 to 2007-09-28. Participants: Brett Schwarz, Steffen Prohaska.
Thread: https://gitlist.dev/t/10049

## Brett Schwarz, 2007-09-27 17:00

Subject: Re: Relating to some syntax error in the gitk script
Message-ID: <915048.40970.qm@web38908.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/915048.40970.qm%40web38908.mail.mud.yahoo.com

```
> 
> When I am running the gitk command I get the following error message:-
> 
> ========================================================================
> ===========================
> Error in startup script: syntax error in expression "$i >= [llength
> $argv] && $revtreeargs ne {}"
>     while executing
> "if {$i >= [llength $argv] && $revtreeargs ne {}} {
>     # no -- on command line, but some arguments (other than -d)
>     if {[catch {
>         set f [eval exec..."
>     (file "./gitk" line 7912)
> ========================================================================
> ============================
> 
> Is there a problem with the script or is it a problem with my
> environment...?
> 

What version of Tcl are you running? You should be using >= 8.4





       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

```

## Steffen Prohaska, 2007-09-28 20:57

Subject: [PATCH] gitk: add check for required tcl version >= 8.4
Message-ID: <11910130423769-git-send-email-prohaska@zib.de>
URL: https://gitlist.dev/e/11910130423769-git-send-email-prohaska%40zib.de
In-Reply-To: <915048.40970.qm@web38908.mail.mud.yahoo.com>

```
gitk requires tcl version >= 8.4 to work flawlessly. So let's
check the tcl version and quit if it's too low.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 gitk |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gitk b/gitk
index 300fdce..6ea6489 100755
--- a/gitk
+++ b/gitk
@@ -7,6 +7,11 @@ exec wish "$0" -- "$@"
 # and distributed under the terms of the GNU General Public Licence,
 # either version 2, or (at your option) any later version.
 
+if {[info tclversion] < 8.4} {
+   puts stderr "Sorry, gitk requires tcl version >= 8.4."
+   exit 1 
+}
+
 proc gitdir {} {
     global env
     if {[info exists env(GIT_DIR)]} {
-- 
1.5.3.2.111.g5166

```
