1
0
mirror of https://github.com/GeyserMC/PackConverter.git synced 2026-01-04 15:31:36 +00:00

Clean up CLI handling

This commit is contained in:
Aurora
2025-08-07 19:15:19 +01:00
parent c29ecb49c9
commit f3bf4e030c
2 changed files with 2 additions and 5 deletions

View File

@@ -41,16 +41,13 @@ public class Main {
boolean debug = args.contains("--debug") || args.contains("-d");
if (args.contains("nogui")) {
if (!args.contains("--input")) {
if (!args.contains("--input") || args.indexOf("--input") + 1 >= args.size()) {
throw new IllegalArgumentException("No input provided.");
} else if (args.indexOf("--input") + 1 >= args.size()) {
throw new IllegalArgumentException("Input specified with no value.");
}
String inputPath = args.get(args.indexOf("--input") + 1);
String outputPath;
String packName;
if (args.contains("--output")) {