@@ -380,7 +380,7 @@ private boolean obtainLicenseFromResolvers() throws Exception {
380380 private void checkPreConditions () throws Exception {
381381 // This is for testing!
382382 boolean ignoreIssues = false ;
383- if (System .getProperty ("engine.ignore.preCheckIssues" ).equalsIgnoreCase ("true" )) {
383+ if (System .getProperty ("engine.ignore.preCheckIssues" , "false" ).equalsIgnoreCase ("true" )) {
384384 ignoreIssues = true ;
385385 System .out .println ("engine.ignore.preCheckIssues = true, ignoring errors found during pre-check!" );
386386 }
@@ -439,12 +439,18 @@ private void checkPreConditions() throws Exception {
439439 }
440440 }
441441
442- // If caller has not specified a user-data directory, assume the one that comes with the engine distribution
443- // that is being used .
442+ // If caller has not specified a user-data directory directly, check to see if one was specified in system property
443+ // nuix.userDataDirs. If not specified there, then use the one specified in the engine release directory .
444444 if (userDataDirectorySupplier == null ) {
445- System .out .println ("No user data directory was specified, assuming directory relative to engine distribution: " +
446- new File (engineDistributionDirectorySupplier .get (), "user-data" ).getAbsolutePath ());
447- userDataDirectorySupplier = () -> new File (engineDistributionDirectorySupplier .get (), "user-data" );
445+ String userDataDirProp = System .getProperty ("nuix.userDataBase" );
446+ if (userDataDirProp != null && !userDataDirProp .isBlank ()) {
447+ System .out .println ("Using user data directory provided in property 'nuix.userDataBase': " + userDataDirProp );
448+ userDataDirectorySupplier = () -> new File (userDataDirProp );
449+ } else {
450+ System .out .println ("No user data directory was specified, assuming directory relative to engine distribution: " +
451+ new File (engineDistributionDirectorySupplier .get (), "user-data" ).getAbsolutePath ());
452+ userDataDirectorySupplier = () -> new File (engineDistributionDirectorySupplier .get (), "user-data" );
453+ }
448454 }
449455
450456 // Make sure PATH points to expected bin and bin/x86 subdirectories of our engine distribution
0 commit comments