From 7f951ccd70901739a2365a7d4951d6a6b7faacbf Mon Sep 17 00:00:00 2001 From: Nicolas Micoud <58596990+nmicoud@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:17:38 +0100 Subject: [PATCH] IDEMPIERE-5795: DeveloperMode context variable - System Property (#2243) * IDEMPIERE-5795: DeveloperMode context variable - System Property https://idempiere.atlassian.net/browse/IDEMPIERE-5795 * IDEMPIERE-5795: DeveloperMode context variable - System Property - simplify Suggested by @hengsin Co-Authored-By: hengsin <152246+hengsin@users.noreply.github.com> --------- Co-authored-by: hengsin <152246+hengsin@users.noreply.github.com> --- org.adempiere.base/src/org/compiere/util/Util.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/util/Util.java b/org.adempiere.base/src/org/compiere/util/Util.java index f1f6555342..b1ccb1baa3 100644 --- a/org.adempiere.base/src/org/compiere/util/Util.java +++ b/org.adempiere.base/src/org/compiere/util/Util.java @@ -778,10 +778,10 @@ public class Util /** * Is running from Eclipse - * @return true if there is a directory org.adempiere.base within AdempiereHome (is the case when executed from Eclipse) + * @return true if there is a directory org.adempiere.base within AdempiereHome or if there is a System property org.idempiere.developermode set to Y */ public static boolean isDeveloperMode() { - return Files.isDirectory(Paths.get(Adempiere.getAdempiereHome() + File.separator + "org.adempiere.base")); + return Files.isDirectory(Paths.get(Adempiere.getAdempiereHome() + File.separator + "org.adempiere.base")) || "Y".equals(System.getProperty("org.idempiere.developermode")); } } // Util