Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: handle nil user-init-file in ac-update-packages-async

+10 -5
+10 -5
dotfiles/dot_config/emacs.el
··· 597 597 (defun ac-update-packages-async () 598 598 "Update all packages asynchronously in background subprocess." 599 599 (ac-debug-log "Checking for package updates in background...") 600 - (let ((default-directory user-emacs-directory)) 601 - ;; Run in a subprocess so it doesn't block anything 602 - (start-process "straight-update" "*straight-update*" 603 - "emacs" "--batch" "-l" user-init-file 604 - "--eval" "(progn (straight-pull-all) (straight-rebuild-all))"))) 600 + (let ((default-directory user-emacs-directory) 601 + (init-file (or user-init-file 602 + (expand-file-name "init.el" user-emacs-directory) 603 + (expand-file-name ".emacs" "~")))) 604 + (if (and init-file (file-exists-p init-file)) 605 + ;; Run in a subprocess so it doesn't block anything 606 + (start-process "straight-update" "*straight-update*" 607 + "emacs" "--batch" "-l" init-file 608 + "--eval" "(progn (straight-pull-all) (straight-rebuild-all))") 609 + (ac-debug-log "WARNING: Could not find init file for package update")))) 605 610 606 611 ;; Manual update command 607 612 (defun ac-update-packages ()