@@ -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
0 commit comments