   (straight--with-plist emacsmirror-recipe
       (local-repo)
     (let ((default-directory (straight--dir "repos" local-repo)))
-      (with-temp-buffer
-        (when (straight--check-call
-               "git" "config" "-f" ".gitmodules"
-               "--get" (format "submodule.%s.url"
-                               (symbol-name package)))
-          (let ((url (string-trim (buffer-string))))
-            (if (string-match
-                 "^git@github\\.com:\\([A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+\\)\\.git$"
-                 url)
-                `(,package :fetcher github
-                           :repo ,(match-string 1 url))
-              `(,package :fetcher git
-                         :url ,url))))))))
+      (let ((url (condition-case nil
+                     (straight--get-call
+                      "git" "config" "-f" ".gitmodules"
+                      "--get" (format "submodule.%s.url"
+                                      (symbol-name package)))
+                   (error nil))))
+        (and (not (string-empty-p url))
+             (if (string-match
+                  (concat "^git@github\\.com:\\([A-Za-z0-9_.-]+"
+                          "/[A-Za-z0-9_.-]+\\)\\.git$")
+                  url)
+                 `(,package :fetcher github
+                            :repo ,(match-string 1 url))
+               `(,package :fetcher git
+                          :url ,url)))))))
 
 (defvar straight--repo-cache (make-hash-table :test 'equal))
 

(autoload 'pbl-checkout "pbl")
(autoload 'pbl-expand-file-specs "pbl")
(autoload 'pbl--config-file-list "pbl")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Utility functions

                      (hash-table-keys straight--recipe-cache)
                      (lambda (elt) t)
                      'require-match)))
  (straight--with-progress (format "Updating package %S" package)
    (straight--update-package (gethash package straight--recipe-cache))))

;;;###autoload
(defun straight-update-all ()
