Skip to content

Commit d287239

Browse files
committed
fix(multiplayer): incorrect cato arguments.
1 parent 65d4c9c commit d287239

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

HMCL/src/main/java/org/jackhuang/hmcl/ui/multiplayer/MultiplayerManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ private static CompletableFuture<CatoSession> startCato(String token, State stat
133133
throw e;
134134
}
135135

136-
String[] commands = new String[]{exe.toString(), "-auth.token", token};
136+
String[] commands = StringUtils.isBlank(token)
137+
? new String[]{exe.toString()}
138+
: new String[]{exe.toString(), "-auth.token", token};
137139
Process process = new ProcessBuilder()
138140
.command(commands)
139141
.start();

0 commit comments

Comments
 (0)