summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/openslx/satserver/util/Exec.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satserver/util/Exec.java b/src/main/java/org/openslx/satserver/util/Exec.java
index e273409..7fbf686 100644
--- a/src/main/java/org/openslx/satserver/util/Exec.java
+++ b/src/main/java/org/openslx/satserver/util/Exec.java
@@ -5,6 +5,8 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
+import org.openslx.taskmanager.api.Environment;
+
public class Exec
{
@@ -29,6 +31,10 @@ public class Exec
{
ProcessBuilder pb = new ProcessBuilder( command );
pb.directory( new File( cwd ) );
+ if (Environment.get() != null ) {
+ pb.environment().clear();
+ pb.environment().putAll( Environment.get() );
+ }
Process p = null;
Thread[] list = null;
try {