From 6f00bc0b90e3f3749f60ded066ccca85055240b9 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Thu, 19 Sep 2024 18:29:37 +0200 Subject: [PATCH] better boxlang detection --- system/TestBox.cfc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/TestBox.cfc b/system/TestBox.cfc index 560efcd..51aac6c 100644 --- a/system/TestBox.cfc +++ b/system/TestBox.cfc @@ -33,9 +33,9 @@ component accessors="true" { property name="bundlesPattern"; // Static Variables - variables.TESTBOX_PATH = expandPath( "/testbox" ); - variables.IS_BOXLANG = server.keyExists( "boxlang" ); - variables.IS_CLI = !getFunctionList().keyExists( "getPageContext" ); + variables.TESTBOX_PATH = expandPath( "/testbox" ); + variables.IS_BOXLANG = server.keyExists( "boxlang" ); + variables.IS_CLI = variables.IS_BOXLANG && server.boxlang.cliMode ? true : false; variables.DEFAULT_REPORTER = variables.IS_CLI ? "text" : "simple"; variables.DEFAULT_BUNDLES_PATTERN = "*Spec*.cfc|*Test*.cfc|*Spec*.bx|*Test*.bx"; // TestBox Info : Modified by the build process.