From 7c68bf021cc70aa0ce569631aace14aa9cb0e2ac Mon Sep 17 00:00:00 2001 From: Zaxar163 <35835496+Zaxar163@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:48:34 +0300 Subject: [PATCH] [FIX] Non-critical restart cmd. --- .../src/main/java/ru/gravit/launchserver/LaunchServer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 376db65e..5a4e2849 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -650,8 +650,7 @@ public void syncUpdatesDir(Collection dirs) throws IOException { public void restart() { ProcessBuilder builder = new ProcessBuilder(); - List args = new ArrayList<>(); - if (config.startScript != null) args.add(config.startScript); + if (config.startScript != null) builder.command(Collections.singletonList(config.startScript)); else throw new IllegalArgumentException("Please create start script and link it as startScript in config."); builder.directory(this.dir.toFile()); builder.inheritIO();