From f60955a21a2aa55f760fb2c81d5e338c01ef3cec Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Sat, 29 Sep 2012 15:12:10 -0600 Subject: [PATCH] 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. --- lisp/ob-sh.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob-sh.el b/lisp/ob-sh.el index 993b796d9..1cb607f14 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)))))) -- 2.11.4.GIT