Fix Linux/MacOS issues
This commit is contained in:
parent
68c7f793b3
commit
11af956c84
1 changed files with 9 additions and 1 deletions
|
@ -106,7 +106,7 @@ public class RunConfig {
|
|||
default:
|
||||
runConfig.mainClass = "net.fabricmc.devlaunchinjector.Main";
|
||||
runConfig.programArgs = "";
|
||||
runConfig.vmArgs = "-Dfabric.dli.config=\"" + extension.getDevLauncherConfig().getAbsolutePath() + "\" -Dfabric.dli.env=" + mode.toLowerCase();
|
||||
runConfig.vmArgs = "-Dfabric.dli.config=" + quoteIfNeeded(extension.getDevLauncherConfig().getAbsolutePath()) + " -Dfabric.dli.env=" + mode.toLowerCase();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -218,4 +218,12 @@ public class RunConfig {
|
|||
|
||||
throw new RuntimeException("Failed to find mainclass");
|
||||
}
|
||||
|
||||
private static String quoteIfNeeded(String input) {
|
||||
if (!input.contains(" ")) {
|
||||
return input;
|
||||
}
|
||||
|
||||
return String.format("\"%s\"", input);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue