diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/eglot-tests.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el index 5d5de59a19a..7a90d68d213 100644 --- a/test/lisp/progmodes/eglot-tests.el +++ b/test/lisp/progmodes/eglot-tests.el | |||
| @@ -103,22 +103,21 @@ then restored." | |||
| 103 | (set (car spec) (cadr spec))) | 103 | (set (car spec) (cadr spec))) |
| 104 | ((stringp (car spec)) (push spec file-specs)))) | 104 | ((stringp (car spec)) (push spec file-specs)))) |
| 105 | (unwind-protect | 105 | (unwind-protect |
| 106 | (let* ((home (getenv "HOME")) | 106 | (let* ((process-environment |
| 107 | (process-environment | ||
| 108 | (append | 107 | (append |
| 109 | `(;; Set XDF_CONFIG_HOME to /dev/null to prevent | 108 | `(;; Set XDF_CONFIG_HOME to /dev/null to prevent |
| 110 | ;; user-configuration to have an influence on | 109 | ;; user-configuration to have an influence on |
| 111 | ;; language servers. (See github#441) | 110 | ;; language servers. (See github#441) |
| 112 | "XDG_CONFIG_HOME=/dev/null" | 111 | "XDG_CONFIG_HOME=/dev/null" |
| 113 | ;; ... on the flip-side, a similar technique by | 112 | ;; ... on the flip-side, a similar technique by |
| 114 | ;; Emacs's test makefiles means that HOME is set to | 113 | ;; Emacs's test makefiles means that HOME is |
| 115 | ;; /nonexistent. This breaks some common | 114 | ;; spoofed to /nonexistent, or sometimes /tmp. |
| 116 | ;; installations for LSP servers like pylsp, making | 115 | ;; This breaks some common installations for LSP |
| 117 | ;; these tests mostly useless, so we hack around it | 116 | ;; servers like pylsp, rust-analyzer making these |
| 118 | ;; here with a great big hack. | 117 | ;; tests mostly useless, so we hack around it here |
| 118 | ;; with a great big hack. | ||
| 119 | ,(format "HOME=%s" | 119 | ,(format "HOME=%s" |
| 120 | (if (file-exists-p home) home | 120 | (expand-file-name (format "~%s" (user-login-name))))) |
| 121 | (format "/home/%s" (getenv "USER"))))) | ||
| 122 | process-environment)) | 121 | process-environment)) |
| 123 | ;; Prevent "Can't guess python-indent-offset ..." messages. | 122 | ;; Prevent "Can't guess python-indent-offset ..." messages. |
| 124 | (python-indent-guess-indent-offset-verbose . nil) | 123 | (python-indent-guess-indent-offset-verbose . nil) |