bin/doctor: better tar detection on MacOS
This commit is contained in:
parent
086b306562
commit
9f698e9f2d
1 changed files with 16 additions and 12 deletions
28
bin/doctor
28
bin/doctor
|
@ -141,19 +141,23 @@
|
||||||
(explain! "DOOM was designed for MacOS and Linux. Expect a bumpy ride!"))
|
(explain! "DOOM was designed for MacOS and Linux. Expect a bumpy ride!"))
|
||||||
|
|
||||||
;; bsd vs gnu tar
|
;; bsd vs gnu tar
|
||||||
(if (executable-find "tar")
|
(let ((tar-bin (or (executable-find "gtar")
|
||||||
(check! (not (string-match-p "(GNU tar)" (shell-command-to-string "tar --version")))
|
(executable-find "tar"))))
|
||||||
(warn! "Warning: BSD tar detected")
|
(if tar-bin
|
||||||
|
(check! (not (string-match-p "(GNU tar)" (shell-command-to-string (format "%s --version" tar-bin))))
|
||||||
|
(warn! "Warning: BSD tar detected")
|
||||||
|
(explain!
|
||||||
|
"QUELPA (through package-build) uses the system tar to build plugins, but it "
|
||||||
|
"expects GNU tar. BSD tar *could* cause errors during package installation or "
|
||||||
|
"updating from non-ELPA sources."
|
||||||
|
(when (eq system-type 'darwin)
|
||||||
|
(concat "\nMacOS users can install gnu-tar via homebrew:\n"
|
||||||
|
" brew install gnu-tar"))))
|
||||||
|
(check! t ; very unlikely
|
||||||
|
(error! "Important: Couldn't find tar")
|
||||||
(explain!
|
(explain!
|
||||||
"QUELPA (through package-build) uses the system tar to build plugins."
|
"This is required by package.el and QUELPA to build packages and will "
|
||||||
"BSD tar *could* cause errors during package installation or updating from"
|
"prevent you from installing & updating packages."))))
|
||||||
"non-ELPA sources."
|
|
||||||
(when (eq system-type 'darwin)
|
|
||||||
(concat "\nMacOS users can install gnu-tar via homebrew:\n"
|
|
||||||
" brew install gnu-tar"))))
|
|
||||||
(check! t ; very unlikely
|
|
||||||
(error! "Important: Couldn't find tar")
|
|
||||||
(explain! "This is required by package.el and QUELPA to build packages.")))
|
|
||||||
|
|
||||||
|
|
||||||
;; --- report! ------------------------------------------------
|
;; --- report! ------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue