You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(defun require-package (package &optional min-version no-refresh)
"Install given PACKAGE, optionally requiring MIN-VERSION.
If NO-REFRESH is non-nil, the available package lists will not be
re-downloaded in order to locate PACKAGE."
(when (stringp min-version)
(setq min-version (version-to-list min-version)))
(or (package-installed-p package min-version)
(let* ((known (cdr (assoc package package-archive-contents)))
(best (car (sort known (lambda (a b)
(version-list-<= (package-desc-version b)
(package-desc-version a)))))))
(if (and best (version-list-<= min-version (package-desc-version best)))
(package-install best)
(if no-refresh
(error "No version of %s >= %S is available" package min-version)
(package-refresh-contents)
(require-package package min-version t)))
(package-installed-p package min-version))))
(defun maybe-require-package (package &optional min-version no-refresh)
"Try to install PACKAGE, and return non-nil if successful.
In the event of failure, return nil and print a warning message.
Optionally require MIN-VERSION. If NO-REFRESH is non-nil, the
available package lists will not be re-downloaded in order to
locate PACKAGE."
(condition-case err
(require-package package min-version no-refresh)
(error
(message "Couldn't install optional package `%s': %S" package err)
nil)))
Environment & Version information
Projectile version information
Version: projectile-20240212.1100
Projectile version: projectile-20240212.1100
Emacs version
GNU Emacs 29.3
Operating system
MacOS Sonoma 14.5
Apple M3 Pro
The text was updated successfully, but these errors were encountered:
Expected behavior
Actual behavior
Screen.Recording.2024-06-10.at.15.41.52.mov
Steps to reproduce the problem
This error occurs in both cases:
The declaration of maybe-require-package
Environment & Version information
Projectile version information
Version: projectile-20240212.1100
Emacs version
GNU Emacs 29.3
Operating system
The text was updated successfully, but these errors were encountered: