From b66a4c2b9d72430b11d2c6763b4695f05d802510 Mon Sep 17 00:00:00 2001 From: Psionik K <73710933+psionic-k@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:10:28 +0900 Subject: [PATCH] It's best to start with some kind of commit Elpaca doesn't like recipes with no commits in the source repo Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com> --- lisp/scratch-pkgs.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/scratch-pkgs.el b/lisp/scratch-pkgs.el index 6e7bb6b..0fe168b 100644 --- a/lisp/scratch-pkgs.el +++ b/lisp/scratch-pkgs.el @@ -200,8 +200,14 @@ which ones are scratch by looking at the local repos." (error "Could not init repository for new package")) (unless (eq 0 (call-process git-bin nil output nil "add" (buffer-file-name))) (pop-to-buffer output) - (error "Could not add new package: %s" (buffer-file-name)))) - (run-hooks 'scratch-pkgs-after-package-init-hook))) + (error "Could not add new package: %s" (buffer-file-name))) + (pcase scratch-pkgs-mode + ((or 'elpaca 'straight) + (unless (eq 0 (call-process git-bin nil output nil + "commit" "-m" "first commit")) + (pop-to-buffer output) + (error "Could not add new package: %s" (buffer-file-name))))) + (run-hooks 'scratch-pkgs-after-package-init-hook)))) ;;;###autoload (defun scratch-pkgs-new (name)