     (doom-template-insert "QUICKSTART_INTRO")
     (print! (buffer-string))))
 
-(defun doom-patch-macos (args)
+(defun doom-patch-macos (undo-p appdir)
   "Patches Emacs.app to respect your shell environment."
   (unless IS-MAC
     (user-error "You don't seem to be running MacOS"))
-  (let ((appdir
-         (cl-find-if #'file-exists-p
-                     (list "/Applications/Emacs.app"
-                           "~/Applications/Emacs.app"))))
-    (unless appdir
-      (user-error "Couldn't find Emacs.app in /Applications or ~/Applications"))
-    (let ((oldbin (expand-file-name "Contents/MacOS/Emacs" appdir))
-          (newbin (expand-file-name "Contents/MacOS/RunEmacs" appdir)))
-      (cond ((or (member "--undo" args)
-                 (member "-u" args))
-             (unless (file-exists-p newbin)
-               (user-error "Emacs.app is not patched"))
-             (copy-file newbin oldbin 'ok-if-already-exists nil nil 'preserve-permissions)
-             (unless (file-exists-p oldbin)
-               (error "Failed to copy %s to %s" newbin oldbin))
-             (delete-file newbin)
-             (message "%s successfully unpatched" appdir))
-
-            ((file-exists-p newbin)
-             (user-error "%s is already patched" appdir))
-
-            ((or doom-auto-accept
-                 (y-or-n-p (concat "/Applications/Emacs.app needs to be patched. See `bin/doom help patch-macos' for why and how.\n\n"
-                                   "Patch Emacs.app?")))
-             (message "Patching '%s'" appdir)
-             (copy-file oldbin newbin nil nil nil 'preserve-permissions)
-             (unless (file-exists-p newbin)
-               (error "Failed to copy %s to %s" oldbin newbin))
-             (with-temp-buffer
-               (insert "#!/usr/bin/env bash\n"
-                       "args=\"$@\"\n"
-                       "pwd=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\"; pwd -P)\"\n"
-                       "exec \"$SHELL\" -c \"$pwd/RunEmacs $args\"")
-               (write-file oldbin)
-               (chmod oldbin (file-modes newbin)))
-             (message "%s successfully patched" appdir))))))
+  (unless (file-directory-p appdir)
+    (user-error "Couldn't find '%s'" appdir))
+  (let ((oldbin (expand-file-name "Contents/MacOS/Emacs" appdir))
+        (newbin (expand-file-name "Contents/MacOS/RunEmacs" appdir)))
+    (cond (undo-p
+           (unless (file-exists-p newbin)
+             (user-error "Emacs.app is not patched"))
+           (copy-file newbin oldbin 'ok-if-already-exists nil nil 'preserve-permissions)
+           (unless (file-exists-p oldbin)
+             (error "Failed to copy %s to %s" newbin oldbin))
+           (delete-file newbin)
+           (message "%s successfully unpatched" appdir))
+
+          ((file-exists-p newbin)
+           (user-error "%s is already patched" appdir))
+
+          ((or doom-auto-accept
+               (y-or-n-p
+                (concat "Doom would like to patch your Emacs.app bundle so that it respects\n"
+                        "your shell configuration. For more information on why and how, run\n\n"
+                        "  bin/doom help patch-macos\n\n"
+                        "Patch Emacs.app?")))
+           (message "Patching '%s'" appdir)
+           (copy-file oldbin newbin nil nil nil 'preserve-permissions)
+           (unless (file-exists-p newbin)
+             (error "Failed to copy %s to %s" oldbin newbin))
+           (with-temp-buffer
+             (insert "#!/usr/bin/env bash\n"
+                     "args=\"$@\"\n"
+                     "pwd=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\"; pwd -P)\"\n"
+                     "exec \"$SHELL\" -c \"$pwd/RunEmacs $args\"")
+             (write-file oldbin)
+             (chmod oldbin (file-modes newbin)))
+           (message "%s successfully patched" appdir)))))
 
 
 ;;

                    (car e)
                    (buffer-string))))))))

(defun doom-quickstart ()
  "Quickly deploy a private module and Doom.


        (with-temp-file config-file (insert ""))
        (print! (green "Done!")))))
  ;; Ask if Emacs.app should be patched
  (when IS-MAC
    (message "MacOS detected")
    (condition-case e
        (doom-patch-macos nil (doom--find-emacsapp-path))
      (user-error (message "%s" (error-message-string e)))))
  ;; Install Doom packages
  (print! "Installing plugins")
  (doom-packages-install doom-auto-accept)
