Skip to content

Instantly share code, notes, and snippets.

@Garbee
Last active November 29, 2016 19:41
Show Gist options
  • Save Garbee/9699b9cb4a21325bba246469cf7b3569 to your computer and use it in GitHub Desktop.
Save Garbee/9699b9cb4a21325bba246469cf7b3569 to your computer and use it in GitHub Desktop.
diff --git a/services/terminal.js b/services/terminal.js
index 742b553..e13242f 100644
--- a/services/terminal.js
+++ b/services/terminal.js
@@ -12,7 +12,15 @@ function Terminal(notify)
Terminal.prototype = {
init: function(params)
{
- this._term = pty.spawn(process.platform === "win32" ? "cmd.exe" : "bash", [], {
+ let shell = "";
+
+ if (process.platform === "win32") {
+ shell = process.env['comspec'] || "cmd.exe";
+ } else {
+ shell = process.env.SHELL || "sh";
+ }
+
+ this._term = pty.spawn(shell, [], {
name: "xterm-color",
cols: params.cols || 80,
rows: params.rows || 24,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment