Skip to content

Commit aebae03

Browse files
authored
fix(lisp): Set up paths regardless of the working env (#386)
* fix: Set up paths regardless of the working env * changelog * fix: ensure user dir
1 parent 8b38fbc commit aebae03

4 files changed

Lines changed: 18 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
1111
* fix(lisp): Fix line containing format placeholders ([#377](../../pull/377))
1212
* feat: Add `root` command ([`2a3872b`](../../commit/2a3872b0ac842268eb69cca403ab3ad8cda72a21))
1313
* fix(lisp/emacs): Respect Eask file settings when possible ([`1b5aaa1`](../../commit/1b5aaa121b5d6a39e3a0664006fc10a4b22c2e84))
14+
* fix(lisp): Let buttercup tests handle exit code themselves ([#385](../../pull/385))
15+
* fix(lisp): Set up paths regardless of the working environment ([#386](../../pull/386))
1416

1517
## 0.12.x
1618
> Released Dec 02, 2025

lisp/_prepare.el

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -612,11 +612,14 @@ Arguments FNC and ARGS are used for advice `:around'."
612612

613613
(defun eask--update-exec-path ()
614614
"Add all bin directory to the variable `exec-path'."
615-
(dolist (entry (directory-files package-user-dir t directory-files-no-dot-files-regexp))
616-
(when-let* ((bin (expand-file-name "bin" entry))
617-
((file-directory-p bin)))
618-
(add-to-list 'exec-path bin t)))
619-
(delete-dups exec-path))
615+
(when-let* (((file-exists-p package-user-dir))
616+
(entries (directory-files package-user-dir
617+
t directory-files-no-dot-files-regexp)))
618+
(dolist (entry entries)
619+
(when-let* ((bin (expand-file-name "bin" entry))
620+
((file-directory-p bin)))
621+
(add-to-list 'exec-path bin t)))
622+
(delete-dups exec-path)))
620623

621624
(defun eask--update-load-path ()
622625
"Add all .el files to the variable `load-path'."
@@ -702,7 +705,8 @@ scope of the dependencies (it's either `production' or `development')."
702705
(eask-with-progress
703706
(ansi-green "Updating environment variables... ")
704707
(eask-with-verbosity 'debug
705-
(eask--update-exec-path) (eask--update-load-path)
708+
(eask--update-exec-path)
709+
(eask--update-load-path)
706710
(setenv "PATH" (string-join exec-path path-separator))
707711
(setenv "EMACSLOADPATH" (string-join load-path path-separator)))
708712
(ansi-green "done ✓")))
@@ -1385,6 +1389,8 @@ This uses function `locate-dominating-file' to look up directory tree."
13851389
(eask-msg "✗ Loading config Eask file... missing!"))
13861390
(eask-msg ""))
13871391
(package-activate-all)
1392+
(ignore-errors (make-directory package-user-dir t))
1393+
(eask--silent (eask-setup-paths))
13881394
(eask--load-config)
13891395
(eask--with-hooks ,@body)))
13901396
((eask-global-p)
@@ -1400,6 +1406,7 @@ This uses function `locate-dominating-file' to look up directory tree."
14001406
(eask-msg ""))
14011407
(package-activate-all)
14021408
(ignore-errors (make-directory package-user-dir t))
1409+
(eask--silent (eask-setup-paths))
14031410
(eask-with-verbosity 'debug (eask--load-config))
14041411
(eask--with-hooks ,@body))))
14051412
((eask-special-p) ; Commands without Eask-file needed!
@@ -1419,6 +1426,7 @@ This uses function `locate-dominating-file' to look up directory tree."
14191426
(eask-msg ""))
14201427
(package-activate-all)
14211428
(ignore-errors (make-directory package-user-dir t))
1429+
(eask--silent (eask-setup-paths))
14221430
(eask-with-verbosity 'debug (eask--load-config))
14231431
(eask--with-hooks ,@body))))
14241432
(t

lisp/core/exec-path.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
(mapc #'eask-exec-path--print exec-path)
3131
(if (zerop (length exec-path))
3232
(eask-info "(No exec-path found)")
33-
(eask-info "(Total of %s exec-path)" (length exec-path)))))
33+
(eask-info "(Total of %s `exec-path` printed)" (length exec-path)))))
3434

3535
;;; core/exec-path.el ends here

lisp/core/load-path.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@
3434
(mapc #'eask-load-path--print load-path)
3535
(if (zerop (length load-path))
3636
(eask-info "(No load-path found)")
37-
(eask-info "(Total of %s load-path)" (length load-path)))))
37+
(eask-info "(Total of %s `load-path` printed)" (length load-path)))))
3838

3939
;;; core/load-path.el ends here

0 commit comments

Comments
 (0)