Skip to content

Commit b2a3c5a

Browse files
authored
Respect XDG in package.el warning (#1266)
Handles part of #1265
1 parent e6d691d commit b2a3c5a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

straight.el

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7447,11 +7447,18 @@ Must be set before bootstrap."))
74477447
;; Warn the user if package.el was also loaded in the current session,
74487448
;; see <https://github.com/radian-software/straight.el/issues/1036>.
74497449
(let ((tips
7450-
(concat
7451-
"You may wish to delete ~/.emacs.d/elpa or add "
7452-
"(setq package-enable-at-startup nil) to "
7453-
"~/.emacs.d/early-init.el to avoid multiple versions "
7454-
"of the same packages being loaded.")))
7450+
(format
7451+
(concat
7452+
"You may wish to delete %s or add "
7453+
"(setq package-enable-at-startup nil) to "
7454+
"%s to avoid multiple versions "
7455+
"of the same packages being loaded.")
7456+
(if (bound-and-true-p package-user-dir)
7457+
(abbreviate-file-name package-user-dir)
7458+
"~/.emacs.d/elpa")
7459+
(if (bound-and-true-p early-init-file)
7460+
(abbreviate-file-name early-init-file)
7461+
"~/.emacs.d/early-init.el"))))
74557462
(if (and (featurep 'package)
74567463
package-enable-at-startup
74577464
(file-exists-p (bound-and-true-p package-user-dir)))

0 commit comments

Comments
 (0)