Skip to content

Commit

Permalink
core: Use https for org package repo
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjensen authored and syl20bnr committed Jan 24, 2018
1 parent c25f1c6 commit 3fa3997
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions core/core-configuration-layer.el
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,7 @@ The returned list has a `package-archives' compliant format."
apath
(concat
(if (and dotspacemacs-elpa-https
(not spacemacs-insecure)
;; for now org ELPA repository does
;; not support HTTPS
;; TODO when org ELPA repo support
;; HTTPS remove the check
;; `(not (equal "org" aname))'
(not (equal "org" aname)))
(not spacemacs-insecure))
"https://"
"http:https://")
apath)))))
Expand Down Expand Up @@ -2180,7 +2174,7 @@ Original code from dochang at https://github.com/dochang/elpa-clone"
(configuration-layer/make-all-packages 'no-discover)
(let (package-archive-contents
(package-archives '(("melpa" . "https://melpa.org/packages/")
("org" . "http:https://orgmode.org/elpa/")
("org" . "https:https://orgmode.org/elpa/")
("gnu" . "https://elpa.gnu.org/packages/"))))
(package-refresh-contents)
(package-read-all-archive-contents)
Expand Down
10 changes: 2 additions & 8 deletions tests/core/core-configuration-layer-utest.el
Original file line number Diff line number Diff line change
Expand Up @@ -289,16 +289,10 @@
(should (equal '(("melpa" . "http:https://melpa.org/packages/"))
(configuration-layer//resolve-package-archives input)))))

(ert-deftest test-resolve-package-archives--org-supports-http ()
(ert-deftest test-resolve-package-archives--org-supports-https ()
(let ((input '(("org" . "orgmode.org/elpa/")))
dotspacemacs-elpa-https)
(should (equal '(("org" . "http:https://orgmode.org/elpa/"))
(configuration-layer//resolve-package-archives input)))))

(ert-deftest test-resolve-package-archives--org-does-not-support-https ()
(let ((input '(("org" . "orgmode.org/elpa/")))
(dotspacemacs-elpa-https t))
(should (equal '(("org" . "http:https://orgmode.org/elpa/"))
(should (equal '(("org" . "https://orgmode.org/elpa/"))
(configuration-layer//resolve-package-archives input)))))

(ert-deftest test-resolve-package-archives--idempotent-when-already-http-prefix ()
Expand Down

0 comments on commit 3fa3997

Please sign in to comment.