Skip to content

Commit

Permalink
org-babel-sh-evaluate: Do not issue string :results value
Browse files Browse the repository at this point in the history
* lisp/ob-shell.el (org-babel-sh-evaluate): Do not assume that
:results value always yields string value.  Avoid error when results
is nil.
  • Loading branch information
yantar92 committed Sep 1, 2022
1 parent 5bb699e commit e36c3cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lisp/ob-shell.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down

0 comments on commit e36c3cc

Please sign in to comment.