From fce85954efc1f3e03e527a25b0267e05a77c734d Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Sun, 3 Oct 2021 15:28:43 +0200 Subject: [PATCH] chore(init-tests.el): Try (package-refresh-contents) twice --- tests/init-tests.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/init-tests.el b/tests/init-tests.el index 6b0f443..193787d 100644 --- a/tests/init-tests.el +++ b/tests/init-tests.el @@ -25,7 +25,12 @@ ;; Bootstrap ert-async (unless (package-installed-p 'ert-async) - (package-refresh-contents) + (condition-case nil + (package-refresh-contents) + (error (progn + (message "Retrying in 5 secs...") + (sleep-for 5) + (package-refresh-contents)))) (package-install 'ert-async)) (eval-when-compile (require 'ert-async))