summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorSimon Rettberg2020-02-25 14:22:25 +0100
committerSimon Rettberg2020-02-25 14:22:25 +0100
commit4d9a7fd03d8ef69b52584103a9649d41f5652ff9 (patch)
tree90bc8dac35f5e83f22e1825b0ede6554bd6e0313 /src/main/java
parentscripts:system-restore: Don't import minilinux_* from backup (diff)
downloadtmlite-bwlp-4d9a7fd03d8ef69b52584103a9649d41f5652ff9.tar.gz
tmlite-bwlp-4d9a7fd03d8ef69b52584103a9649d41f5652ff9.tar.xz
tmlite-bwlp-4d9a7fd03d8ef69b52584103a9649d41f5652ff9.zip
Exec helper: Honor environment from file
Diffstat (limited to 'src/main/java')
-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 {