diff options
author | Justin Talbott <justin@waymondo.com> | 2018-04-26 14:21:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-26 14:21:50 -0400 |
commit | 85e580a5e4133f033da095851e864a6ab33e67e9 (patch) | |
tree | e51f2fe83a362956b862284455d7f80ed50e7733 /lisp/use-package | |
parent | e2a322d870199dbd6239acc198521a8b80e33058 (diff) | |
parent | 9f034a0bcfdd8c4a6c691d159f3a333e9ca68912 (diff) | |
download | emacs-85e580a5e4133f033da095851e864a6ab33e67e9.tar.gz emacs-85e580a5e4133f033da095851e864a6ab33e67e9.tar.bz2 emacs-85e580a5e4133f033da095851e864a6ab33e67e9.zip |
Merge pull request from akhramov/fix/ensure-system-package-noconfirm
[Fix https://github.com/jwiegley/use-package/issues/661] ensure-system-package: honor system-packages customizations
GitHub-reference: https://github.com/jwiegley/use-package/issues/673
Diffstat (limited to 'lisp/use-package')
-rw-r--r-- | lisp/use-package/use-package-ensure-system-package.el | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lisp/use-package/use-package-ensure-system-package.el b/lisp/use-package/use-package-ensure-system-package.el index 81beaec104f..9f2a59ae5e6 100644 --- a/lisp/use-package/use-package-ensure-system-package.el +++ b/lisp/use-package/use-package-ensure-system-package.el @@ -6,7 +6,7 @@ ;; Keywords: convenience, tools, extensions ;; URL: https://github.com/waymondo/use-package-ensure-system-package ;; Version: 0.1 -;; Package-Requires: ((use-package "2.1") (system-packages "0.1")) +;; Package-Requires: ((use-package "2.1") (system-packages "1.0.4")) ;; Filename: use-package-ensure-system-package.el ;; License: GNU General Public License version 3, or (at your option) any later version ;; @@ -29,17 +29,7 @@ (defun use-package-ensure-system-package-install-command (pack) "Return the default install command for PACK." - (let ((command - (cdr (assoc 'install (cdr (assoc system-packages-package-manager - system-packages-supported-package-managers)))))) - (unless command - (error (format "%S not supported in %S" 'install system-packages-package-manager))) - (unless (listp command) - (setq command (list command))) - (when system-packages-use-sudo - (setq command (mapcar (lambda (part) (concat "sudo " part)) command))) - (setq command (mapconcat 'identity command " && ")) - (mapconcat 'identity (list command pack) " "))) + (system-packages-get-command 'install pack)) (defun use-package-ensure-system-package-consify (arg) "Turn `arg' into a cons of (`package-name' . `install-command')." |