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>
This commit is contained in:
Nicolas Micoud 2024-02-16 12:17:38 +01:00 committed by Carlos Ruiz
parent 6da2abfd77
commit 7f951ccd70
1 changed files with 2 additions and 2 deletions

View File

@ -778,10 +778,10 @@ public class Util
/** /**
* Is running from Eclipse * 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() { 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 } // Util