   ;; Make it so that `:ensure' uses `straight-use-package' instead of
   ;; `package-install'.
   (defun straight--use-package-ensure-function
-      (name ensure state &optional only-if-installed)
-    (when ensure
+      (name ensure state context &optional only-if-installed)
+    (when (and ensure
+               (or (member context '(:byte-compile :ensure :config))
+                   (y-or-n-p (format "Install package %S?" name))))
       (let ((recipe (or (and (not (eq ensure t)) ensure)
                         (plist-get state :recipe)
                         name)))

;;            packages cannot have the same name)
;;
;; :local-repo - required, the name of the repository

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Libraries

                   (concat "If you want to keep %s, put "
                           "(straight-use-package %s%S) "
                           "in your init-file.")
                   package "'" (intern package)))
                t)))
        (unless interactive
          (straight--register-recipe recipe))
        ;; This is probably not the correct logic for the return
        ;; value.
        t))))

;;;###autoload
(defun straight-reload-package (package &optional interactive)
