diff --git a/pom.xml b/pom.xml
index 001891f..762c839 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
io.github.meeples10.mcresourceanalyzer
mc-resource-analyzer
- 1.2.1
+ 1.2.2
jar
MCResourceAnalyzer
diff --git a/src/main/java/io/github/meeples10/mcresourceanalyzer/Main.java b/src/main/java/io/github/meeples10/mcresourceanalyzer/Main.java
index b0d80d9..25f6315 100644
--- a/src/main/java/io/github/meeples10/mcresourceanalyzer/Main.java
+++ b/src/main/java/io/github/meeples10/mcresourceanalyzer/Main.java
@@ -108,7 +108,7 @@ public String[] getVersion() throws Exception {
.description("Adds a prefix to the program's output files.").build());
spec.addOption(OptionSpec.builder("-t", "--table")
.description("Generates a simple HTML table with the collected data.").build());
- spec.addOption(OptionSpec.builder("-T", "--table-template").paramLabel("PATH").type(int.class).description(
+ spec.addOption(OptionSpec.builder("-T", "--table-template").paramLabel("PATH").type(String.class).description(
"All instances of {{{TABLE}}} in the given file will be replaced by the table generated by the -t option.")
.build());
spec.addOption(OptionSpec.builder("-s", "--statistics")
@@ -171,7 +171,11 @@ private static int parseArgs(ParseResult pr) {
if(pr.hasMatchedOption('T')) {
File template = new File((String) pr.matchedOption('T').getValue());
if(!template.exists() || template.isDirectory()) {
- System.err.println("Invalid table template: " + template.getPath());
+ System.err.println("Table template not found: " + template.getPath());
+ System.exit(1);
+ }
+ if(template.isDirectory()) {
+ System.err.println("Table template must be a file: " + template.getPath());
System.exit(1);
}
tableTemplatePath = template.getPath();