From 60efeb7ae74cd323f9f7b359cb13fa98b5f1c499 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Fri, 13 Oct 2017 18:07:52 +0200 Subject: [PATCH 1/2] Inherit the default process environment by default --- .../appium/java_client/service/local/AppiumServiceBuilder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java b/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java index 1636bbae1..c88f54312 100644 --- a/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java +++ b/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java @@ -93,6 +93,7 @@ public final class AppiumServiceBuilder public AppiumServiceBuilder() { usingPort(DEFAULT_APPIUM_PORT); + withEnvironment(new ProcessBuilder().environment()); } private static void validateNodeStructure(File node) { From e19307df14810e21a5de9647c12e2695ac3d52bd Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Fri, 13 Oct 2017 18:16:09 +0200 Subject: [PATCH 2/2] System.getenv might be faster --- .../appium/java_client/service/local/AppiumServiceBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java b/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java index c88f54312..b0413d165 100644 --- a/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java +++ b/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java @@ -93,7 +93,7 @@ public final class AppiumServiceBuilder public AppiumServiceBuilder() { usingPort(DEFAULT_APPIUM_PORT); - withEnvironment(new ProcessBuilder().environment()); + withEnvironment(System.getenv()); } private static void validateNodeStructure(File node) {