This makes sure we close the handles as we should, which is important
for writing the output to an actual file (bug#72857).
* lisp/eshell/em-script.el (esh-cmd): Require this, just to be explicit.
(eshell-execute-file): Use 'eshell-with-handles'.
(cherry picked from commit
e97ab1c41332e179939f457cc010a606a5124ff8)
;;; Code:
(require 'esh-mode)
+(require 'esh-cmd)
(require 'esh-io)
;;;###esh-module-autoload
(with-temp-buffer
(eshell-mode)
(eshell-do-eval
- `(let ((eshell-current-handles
- (eshell-create-handles ,stdout 'insert ,stderr 'insert))
- (eshell-current-subjob-p))
- ,(eshell--source-file file args))
+ `(eshell-with-handles (,stdout 'insert ,stderr 'insert)
+ (let ((eshell-current-subjob-p))
+ ,(eshell--source-file file args)))
t))))
(cl-defstruct (eshell-princ-target