]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure 'package-vc--version' always returns a version
authorPhilip Kaludercic <philipk@posteo.net>
Sat, 10 Dec 2022 08:47:42 +0000 (09:47 +0100)
committerPhilip Kaludercic <philipk@posteo.net>
Sat, 10 Dec 2022 08:48:02 +0000 (09:48 +0100)
* lisp/emacs-lisp/package-vc.el (package-vc--version): Return "0" even
if the main file exists, but lacks version headers.

lisp/emacs-lisp/package-vc.el

index b514afe288e6480c3eea7c6d30b0d3ea2c79e80a..db54e0e130ecb61dfd6f3d86425dfdcf47ed6244 100644 (file)
@@ -294,7 +294,8 @@ asynchronously."
         (insert-file-contents main-file)
         (package-strip-rcs-id
          (or (lm-header "package-version")
-             (lm-header "version"))))
+             (lm-header "version")
+             "0")))
     "0"))
 
 (defun package-vc--main-file (pkg-desc)