mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-14 19:15:08 -05:00
Added environment variable to set the CWD
This commit is contained in:
parent
5a0305a09b
commit
231ee4b339
1 changed files with 3 additions and 0 deletions
|
@ -117,6 +117,9 @@ public class ViaProxy {
|
|||
final boolean useCLI = args.length > 0 && args[0].equals("cli");
|
||||
|
||||
final List<File> potentialCwds = new ArrayList<>();
|
||||
if (System.getenv("VP_RUN_DIR") != null) {
|
||||
potentialCwds.add(new File(System.getenv("VP_RUN_DIR")));
|
||||
}
|
||||
potentialCwds.add(new File(System.getProperty("user.dir")));
|
||||
potentialCwds.add(new File("."));
|
||||
JarUtil.getJarFile().map(File::getParentFile).ifPresent(potentialCwds::add);
|
||||
|
|
Loading…
Reference in a new issue