about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-08-11 15:22:40 +0100
committerDavid Morgan <djm_uk@protonmail.com>2022-08-11 15:22:40 +0100
commit5f00926920db886eb4063e3dc80fab0b0a0855d2 (patch)
treeb041c116d3a4dc30b06608b2a3a8cda346eb5ab2
parent4ca01126c97ef0c4c7f7d6ead4f0d7843ccd1c98 (diff)
downloaddotfiles-5f00926920db886eb4063e3dc80fab0b0a0855d2.tar.gz
Update upgrade packages function
-rw-r--r--.emacs.d/lisp/init-packages.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-packages.el b/.emacs.d/lisp/init-packages.el
index 9eea07e..a7db5d8 100644
--- a/.emacs.d/lisp/init-packages.el
+++ b/.emacs.d/lisp/init-packages.el
@@ -35,6 +35,7 @@
   :config
   ;; TODO make a copy of the built-in check for system packages work instead
   (defvar my/system-packages '(vterm))
+  ;; emacs -Q --batch -L "~/.emacs.d/lisp/" -l "init-packages.el" -f "my/upgrade-packages"
   (defun my/upgrade-packages ()
     (interactive)
     (epl-refresh)
@@ -48,7 +49,9 @@
       (dolist (upgrade upgrades)
         (epl-package-install (epl-upgrade-available upgrade) 'force)
         (epl-package-delete (epl-upgrade-installed upgrade))))
-    (message "Package upgrade finished.")))
+    (message "Package upgrade finished.")
+    ;; TODO does this help async native-comp to finish when called from the command line?
+    (sit-for 30)))
 
 (provide 'init-packages)
 ;;; init-packages.el ends here