Default to /bin/sh if /bin/bash is absent
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Mon, 10 Oct 2016 20:50:22 +0000 (22:50 +0200)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Tue, 11 Oct 2016 02:14:51 +0000 (04:14 +0200)
plugins/terminal/src/org/jetbrains/plugins/terminal/TerminalOptionsProvider.java

index 5f2926fddea5c3bec717e7ac2e5b11274ab242b2..01466b72610a82f71879b4234a8053a36bc923a1 100644 (file)
@@ -111,7 +111,11 @@ public class TerminalOptionsProvider implements PersistentStateComponent<Termina
     }
 
     if (SystemInfo.isUnix) {
-      return "/bin/bash";
+      if (new File("/bin/bash").exists()) {
+        return "/bin/bash";
+      } else {
+        return "/bin/sh";
+      }
     }
     else {
       return "cmd.exe";