Cleanup (formatting)
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Wed, 10 Aug 2016 14:02:25 +0000 (16:02 +0200)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Wed, 10 Aug 2016 14:02:48 +0000 (16:02 +0200)
platform/platform-api/src/com/intellij/execution/configurations/GeneralCommandLine.java

index 9434698e971cbd4f68e701a1b7190f6a1ce6214b..3ddef550edfd4bd6b3c9be0b35314bd75acc6d20 100644 (file)
@@ -400,9 +400,12 @@ public class GeneralCommandLine implements UserDataHolder {
         environment.putAll(myEnvParams);
       }
     }
-    File workDirectory = getWorkDirectory();
-    if (SystemInfo.isUnix && workDirectory != null) {
-      environment.put("PWD", FileUtil.toSystemDependentName(workDirectory.getAbsolutePath()));
+
+    if (SystemInfo.isUnix) {
+      File workDirectory = getWorkDirectory();
+      if (workDirectory != null) {
+        environment.put("PWD", FileUtil.toSystemDependentName(workDirectory.getAbsolutePath()));
+      }
     }
   }