diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 24f17c2cf74..0648fe9e80f 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -7384,13 +7384,13 @@ This requires restrictions of file name syntax." ;; of process output. So we unset it temporarily. (setenv "PS1") (with-temp-buffer - (should (zerop (process-file "printenv" nil t nil))) - (goto-char (point-min)) - (should - (re-search-forward - (tramp-compat-rx - bol (literal envvar) - "=" (literal (getenv envvar)) eol)))))))) + (when (zerop (process-file "printenv" nil t nil)) + (goto-char (point-min)) + (should + (re-search-forward + (tramp-compat-rx + bol (literal envvar) + "=" (literal (getenv envvar)) eol))))))))) ;; Cleanup. (ignore-errors (kill-buffer buffer))