Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v1.0.4
* Fix shell issue for Ubuntu 16.04LTS based distributions

## v1.0.3
* Fix bug: run_python_code.sh interpret it with sh no with bash
* Add support for xfce4-terminal
Expand Down
3 changes: 2 additions & 1 deletion bin/run_python_code.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
oldIFS=$IFS
IFS=''
arg_l_c=()
Expand Down Expand Up @@ -27,3 +27,4 @@ echo "Press return to continue"
dummy_var=""
read dummy_var
IFS=$old_IFS

10 changes: 5 additions & 5 deletions lib/python-run-terminalnx.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ function run() {
}
var supported_terminals = ["gnome-terminal", "konsole", "xfce4-terminal", "terminator", "xterm", "uxterm"];
var sel_term = atom.config.get("python-run-terminalnx.a_terminal_selection");

function isInArray(sup_terms, term) {
return sup_terms.indexOf(term.toLowerCase()) > -1;
}

if (!(isInArray(supported_terminals, sel_term))) {
atom.notifications.add("warning", sel_term + " is not a supported linux terminal.");
return;
}
}

if (!atom.config.get("python-run-terminalnx.disable_notifications")) {
atom.notifications.add("info", "Saving...");
}
Expand All @@ -80,12 +80,12 @@ function run() {
if (sel_term != "gnome-terminal" && sel_term != "xfce4-terminal" && sel_term != "terminator") {
var ex_op = "-e";
}

var child = child_process.spawn(sel_term, [
ex_op, "/bin/sh", __dirname + "/../bin/run_python_code.sh", file.path, c_l_a
ex_op, "/bin/bash", __dirname + "/../bin/run_python_code.sh", file.path, c_l_a
], {
cwd: info.dir,
detached: true
});
child.unref();
}