Skip to content

Commit

Permalink
fix missing wc3RunArgs detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Frotty committed Dec 29, 2019
1 parent c4257ab commit 2c46847
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import de.peeeq.wurstscript.utils.Utils;
import net.moonlightflower.wc3libs.port.GameVersion;
import net.moonlightflower.wc3libs.port.Orient;
import org.apache.commons.lang.StringUtils;
import org.eclipse.lsp4j.MessageType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -140,7 +141,7 @@ public Object execute(ModelManager modelManager) throws IOException {
}
List<String> cmd = Lists.newArrayList(gameExe.getAbsolutePath());
String wc3RunArgs = configProvider.getWc3RunArgs();
if (wc3RunArgs == null) {
if (wc3RunArgs == null || StringUtils.isBlank(wc3RunArgs)) {
if (W3Utils.getWc3PatchVersion().compareTo(VERSION_1_32) >= 0) {
cmd.add("-launch");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static GameVersion parsePatchVersion(File wc3Path) {
} else if (Orient.isMacSystem()) {
W3Utils.version = new MacGameVersionFinder().get();
}
WLogger.info("Parsed game version: " + version);
WLogger.info("Parsed custom game version: " + version);
} catch (IOException | NotFoundException e) {
WLogger.severe(e);
}
Expand Down

0 comments on commit 2c46847

Please sign in to comment.