Skip to content

Commit

Permalink
chore(init-tests.el): Try (package-refresh-contents) twice
Browse files Browse the repository at this point in the history
  • Loading branch information
erikmd committed Oct 3, 2021
1 parent 172f109 commit e7ea703
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/init-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
(proto (if no-ssl "http" "https")))
(add-to-list 'package-archives
(cons "melpa" (concat proto "://melpa.org/packages/")) t))
(condition-case nil
(package-initialize)
(error (progn
(message "Retrying in 5 secs...")
(sleep-for 5)
(package-initialize))))

(package-initialize)

;; Optionally: bootstrap use-package for declarative package specs
Expand All @@ -25,7 +32,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))
Expand Down

0 comments on commit e7ea703

Please sign in to comment.