org-babel-variable-assignments:eshell: Prevent leaking values into results

* lisp/ob-eshell.el (org-babel-variable-assignments:eshell): Wrap
`setq' eshell call into `ignore' to prevent the variable assignment
values leaking into block output.  Fixes
`ob-eshell/variables-assignment'.
This commit is contained in:
Ihor Radchenko 2023-08-12 11:17:15 +03:00
parent 68aa438857
commit b5aaefb551
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,8 @@ The PARAMS are variables assignments."
"Convert ob-eshell :var specified variables into Eshell variables assignments." "Convert ob-eshell :var specified variables into Eshell variables assignments."
(mapcar (mapcar
(lambda (pair) (lambda (pair)
(format "(setq %s %S)" (car pair) (cdr pair))) ;; Use `ignore' to suppress value in the command output.
(format "(ignore (setq %s %S))" (car pair) (cdr pair)))
(org-babel--get-vars params))) (org-babel--get-vars params)))
(defun org-babel-load-session:eshell (session body params) (defun org-babel-load-session:eshell (session body params)