From: Jim Porter Date: Mon, 3 Oct 2022 01:19:56 +0000 (-0700) Subject: ; Fix logic of $HOME adjustment for 'ert-remote-temporary-file-directory' X-Git-Tag: emacs-29.0.90~1856^2~47 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=43eaa05ff2265ae33f71b73670a8a150a7a716ae;p=emacs.git ; Fix logic of $HOME adjustment for 'ert-remote-temporary-file-directory' * lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory): Only adjust $HOME when it doesn't exist (bug#58265). --- diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el index bfd796586da..a891f068a70 100644 --- a/lisp/emacs-lisp/ert-x.el +++ b/lisp/emacs-lisp/ert-x.el @@ -568,7 +568,7 @@ The same keyword arguments are supported as in `("\\`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.")