branch: elpa/age
commit 9e82487234c53e0fab2314aeab6479e62c68f0c7
Merge: e571ff7873c 365f031b0aa
Author: Bas Alberts <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #6 from bram85/main
    
    Detect development version of age
---
 age.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/age.el b/age.el
index c70aa8ca3e9..ea8a30f9b24 100644
--- a/age.el
+++ b/age.el
@@ -185,10 +185,11 @@ version requirement is met."
 (defun age-config--make-age-configuration (program)
   "Make an age configuration for PROGRAM."
   (let ((version
-         (let ((v (shell-command-to-string (format "%s --version" program))))
+         (pcase (shell-command-to-string (format "%s --version" program))
            ;; assuming https://semver.org/
-           (when (string-match "\\([0-9]+\\.[0-9]+\\.[0-9]+\\)" v)
-             (match-string 1 v)))))
+           ((rx (let v (seq (+ digit) "." (+ digit) "." (+ digit)))) v)
+           ((rx "(devel)") "9.9.9")
+           (_ nil))))
     (list (cons 'program program)
           (cons 'version version))))
 

Reply via email to