diff options
author | Eric Schulte <eric.schulte@gmx.com> | 2012-09-29 15:12:10 -0600 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-09-29 23:47:24 +0200 |
commit | f60955a21a2aa55f760fb2c81d5e338c01ef3cec (patch) | |
tree | 5f4ee5d4608965ef18e9f5a95af13e590b4e3669 | |
parent | c7ffcf924663fccd775e6c9082b372a51f05a86f (diff) | |
download | org-mode-1c63cd2c9864102bc1ba7878bfc53ee45d01acbc.tar.gz |
fix remote execution w/empty shebang header argrelease_7.9.2
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)))))) |