From 90ec870a4fc7e6cd0a41c569ef4484da76917d63 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 9 Jan 2024 09:11:34 +0000 Subject: Use "info exists" to test for Tk presence --- library/tcltest/tcltest.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index d3e9ea4..3b89cf7 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -2583,7 +2583,7 @@ proc tcltest::cleanupTests {{calledFromAllFile 0}} { # loop is running, which is the real issue. # Actually, this doesn't belong here at all. A package # really has no business [exit]-ing an application. - if {![catch {package present Tk}] && ![testConstraint interactive]} { + if {![info exists ::tk_version] && ![testConstraint interactive]} { exit } } else { -- cgit v0.12