diff options
author | Simon Rettberg | 2020-02-25 14:22:25 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-02-25 14:22:25 +0100 |
commit | 4d9a7fd03d8ef69b52584103a9649d41f5652ff9 (patch) | |
tree | 90bc8dac35f5e83f22e1825b0ede6554bd6e0313 /src/main/java/org/openslx/satserver | |
parent | scripts:system-restore: Don't import minilinux_* from backup (diff) | |
download | tmlite-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/org/openslx/satserver')
-rw-r--r-- | src/main/java/org/openslx/satserver/util/Exec.java | 6 |
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 { |