core: add check for gzip executable on Windows to install spacelpa

This commit is contained in:
syl20bnr 2017-10-29 21:39:35 -04:00
parent 5614bae8da
commit 2a11da4ad7

View file

@ -2459,6 +2459,18 @@ ELPA stable repository."
(format "Downloading stable ELPA repository: %s..." (format "Downloading stable ELPA repository: %s..."
configuration-layer--stable-elpa-name)) configuration-layer--stable-elpa-name))
(spacemacs//redisplay) (spacemacs//redisplay)
(if (and (spacemacs/system-is-mswindows)
(not (executable-find "gzip")))
;; additional check on Windows platform as tarball are not handled
;; natively and requires the installation of gzip.
(progn
(configuration-layer//increment-error-count)
(spacemacs-buffer/append
(concat "Error: Cannot find gzip executable in you PATH.\n"
"Download and install gzip here: "
"http://gnuwin32.sourceforge.net/packages/gzip.htm \n"
(format "%s installation has been skipped!"
configuration-layer--stable-elpa-name))))
;; download ;; download
(make-directory configuration-layer--stable-elpa-directory t) (make-directory configuration-layer--stable-elpa-directory t)
(url-copy-file address local 'ok-if-already-exists) (url-copy-file address local 'ok-if-already-exists)
@ -2472,7 +2484,7 @@ ELPA stable repository."
(erase-buffer) (erase-buffer)
(beginning-of-buffer) (beginning-of-buffer)
(insert (format "%s" configuration-layer--stable-elpa-version)) (insert (format "%s" configuration-layer--stable-elpa-version))
(save-buffer))))) (save-buffer))))))
;; (configuration-layer/create-elpa-repository ;; (configuration-layer/create-elpa-repository
;; "spacelpa" ;; "spacelpa"