diff options
author | Eric Schulte <eric.schulte@gmx.com> | 2012-09-29 15:12:10 -0600 |
---|---|---|
committer | Eric Schulte <eric.schulte@gmx.com> | 2012-09-29 15:12:10 -0600 |
commit | 86e515d7cc21534747e32e9bc4763bcdb3e787a8 (patch) | |
tree | b5f6ad4d4151519d907eb14e52041b3801cdc8b0 | |
parent | 871a041ab9e398a2063d4304433da4b81176a22c (diff) | |
download | org-mode-86e515d7cc21534747e32e9bc4763bcdb3e787a8.tar.gz |
fix remote execution w/empty shebang header arg
Thanks to Nick Dokos for isolating this bug and suggesting this fix.
* lisp/ob-sh.el (org-babel-sh-evaluate): Don't could 0-length shebangs.
-rw-r--r-- | lisp/ob-sh.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ob-sh.el b/lisp/ob-sh.el index 993b796..1cb607f 100644 --- a/lisp/ob-sh.el +++ b/lisp/ob-sh.el @@ -190,7 +190,8 @@ return the value of the last statement in BODY." (list org-babel-sh-eoe-indicator)))) 2)) "\n")) ('otherwise ; external shell script - (if (cdr (assoc :shebang params)) + (if (and (cdr (assoc :shebang params)) + (> (length (cdr (assoc :shebang params))) 0)) (let ((script-file (org-babel-temp-file "sh-script-")) (shebang (cdr (assoc :shebang params))) (padline (not (string= "no" (cdr (assoc :padline params)))))) |