1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-04 08:47:03 +00:00

org-babel-sh-evaluate: Do not issue string :results value

* lisp/ob-shell.el (org-babel-sh-evaluate): Do not assume that
:results value always yields string value.  Avoid error when results
is nil.
This commit is contained in:
Ihor Radchenko 2022-09-01 23:08:55 +08:00
parent 5bb699e0fd
commit e36c3cc21b
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -318,7 +318,7 @@ return the value of the last statement in BODY."
(set-file-modes script-file #o755)
(org-babel-eval script-file "")))
(t (org-babel-eval shell-file-name (org-trim body))))))
(when value-is-exit-status
(when (and results value-is-exit-status)
(setq results (car (reverse (split-string results "\n" t)))))
(when results
(let ((result-params (cdr (assq :result-params params))))