From 753b479ea632afcc3792dae9f0b7485cdf6b6beb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 17 Sep 2022 13:05:06 +0200 Subject: [PATCH] feat(cli): add --reload switch to 'profiles sync' So 'doom profiles sync' can be relied on to forcibly regenerate the profile init by default. --- lisp/cli/profiles.el | 4 ++-- lisp/cli/sync.el | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/cli/profiles.el b/lisp/cli/profiles.el index e24d507a7..8d8694c41 100644 --- a/lisp/cli/profiles.el +++ b/lisp/cli/profiles.el @@ -31,14 +31,14 @@ ;; ;;; doom profiles ... -(defcli! (profiles sync) () +(defcli! (profiles sync) ((reload? ("--reload"))) "Synchronize your profiles with Doom." :benchmark t (let* ((old-profiles (doom-profiles-read doom-cli-known-profiles-file)) (new-profiles (doom-profiles-autodetect)) (init-file doom-profiles-bootstrap-file) (version (doom-file-read init-file :by 'read :noerror t)) - (recreate? (doom-profiles-outdated-p))) + (recreate? (or (not reload?) (doom-profiles-outdated-p)))) (unless (file-exists-p init-file) (print! (warn "No profile manifest found. Generating one...")) (print-group! (print! (start "Regenerating it..."))) diff --git a/lisp/cli/sync.el b/lisp/cli/sync.el index 9af7426cd..15515ca11 100644 --- a/lisp/cli/sync.el +++ b/lisp/cli/sync.el @@ -45,7 +45,7 @@ OPTIONS: Defaults to the maximum number of threads (or 1, if your CPU's threadcount can't be determined)." :benchmark t - (call! '(profiles sync)) + (call! '(profiles sync "--reload")) (run-hooks 'doom-before-sync-hook) (add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h) (when jobs