diff --git a/src/fr/devinsy/statoolinfos/cli/StatoolInfosCLI.java b/src/fr/devinsy/statoolinfos/cli/StatoolInfosCLI.java index 1a9d42a..6be4bbb 100644 --- a/src/fr/devinsy/statoolinfos/cli/StatoolInfosCLI.java +++ b/src/fr/devinsy/statoolinfos/cli/StatoolInfosCLI.java @@ -133,7 +133,7 @@ public final class StatoolInfosCLI message.appendln(BuildInformation.instance().version()); - System.out.println(message.toString()); + System.out.print(message.toString()); } /** @@ -387,6 +387,20 @@ public final class StatoolInfosCLI { File configurationFile = new File(StringUtils.trim(args[1])); + try + { + StatoolInfos.probe(configurationFile); + } + catch (Exception exception) + { + logger.error("Error with [{}]: {}", configurationFile.getAbsoluteFile(), exception.getMessage()); + exception.printStackTrace(); + } + } + else if (isMatching(args, "probe", "\\s*.+/\\s*")) + { + File configurationFile = new File(StringUtils.trim(args[1])); + if (configurationFile.isDirectory()) { Files inputs = FilesUtils.searchEndingWith(configurationFile, ".conf"); @@ -405,15 +419,7 @@ public final class StatoolInfosCLI } else { - try - { - StatoolInfos.probe(configurationFile); - } - catch (Exception exception) - { - logger.error("Error with [{}]: {}", configurationFile.getAbsoluteFile(), exception.getMessage()); - exception.printStackTrace(); - } + System.out.println("Parameter is not a directory."); } } else if (isMatching(args, "stat", "ip", "\\s*\\S+\\s*"))