Moving deprecation fail check to after config print.
@@ -126,11 +126,6 @@ public class BootManager {
logger.info("Configuration processed completely.");
- if (detectOptionManager.checkForAnyFailureProperties()) {
- eventSystem.publishEvent(Event.ExitCode, new ExitCodeRequest(ExitCodeType.FAILURE_CONFIGURATION));
- return BootResult.exit(detectConfiguration);
- }
-
DetectConfigurationFactory factory = new DetectConfigurationFactory(detectConfiguration);
DirectoryManager directoryManager = new DirectoryManager(factory.createDirectoryOptions(), detectRun);
FileManager fileManager = new FileManager(detectArgumentState.isDiagnostic(),
@@ -142,6 +137,11 @@ public class BootManager {
checkForInvalidOptions(detectOptionManager);
+ if (detectOptionManager.checkForAnyFailureProperties()) {
+ eventSystem.publishEvent(Event.ExitCode, new ExitCodeRequest(ExitCodeType.FAILURE_CONFIGURATION));
+ return BootResult.exit(detectConfiguration);
+ }
+
HubServiceManager hubServiceManager = new HubServiceManager(detectConfiguration, new ConnectionManager(detectConfiguration), gson, jsonParser);
if (detectConfiguration.getBooleanProperty(DetectProperty.DETECT_TEST_CONNECTION, PropertyAuthority.None)) {
