     (make-directory (straight--dir "build" name) 'parents)
     (dolist (spec (package-build-expand-file-specs
                    (straight--dir "repos" repo)
-                   files))
+                   (package-build--config-file-list files)))
       (let ((repo-file (straight--file "repos" repo (car spec)))
             (build-file (straight--file "build" name (cdr spec))))
         (unless (file-exists-p repo-file)

      (error "No matching file(s) found in %s: %s" dir specs))
    lst))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Low-level API


  ()
  (let ((name (plist-get build-recipe :name))
        (repo (plist-get build-recipe :repo))
        (files (plist-get build-recipe :files)))
    (ignore-errors
      (delete-directory
       (straight--dir "build" name)
