* lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory): Only
adjust $HOME when it doesn't exist (bug#58265).
`("\\`mock\\'" nil ,(system-name)))
;; Emacs's Makefile sets $HOME to a nonexistent value. Needed
;; in batch mode only, therefore.
- (unless (and (null noninteractive) (file-directory-p "~/"))
+ (when (and noninteractive (not (file-directory-p "~/")))
(setenv "HOME" temporary-file-directory))
(format "/mock::%s" temporary-file-directory))))
"Temporary directory for remote file tests.")