From c3354e2620f868355f1d52181e90086809a43c5b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 18 Jul 2019 13:21:05 +0200 Subject: [PATCH] cli: disable patch-macos (only --undo/-u works) This has been deprecated for a while. I will remove it entirely with the 2.1 release, but for now, you can no longer patch your app bundle with this. Use 'doom env refresh' instead. --- core/cli/patch-macos.el | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/core/cli/patch-macos.el b/core/cli/patch-macos.el index 91fbb5a79..8e8bdfb3d 100644 --- a/core/cli/patch-macos.el +++ b/core/cli/patch-macos.el @@ -65,24 +65,7 @@ depending on your shell configuration and isn't always reliable.") (message "%s successfully unpatched" appdir)) ((file-exists-p newbin) - (user-error "%s is already patched" appdir)) + (user-error "%s is already patched. Use 'doom patch-macos --undo' to unpatch it" + appdir)) - ((or doom-auto-accept - (y-or-n-p - (concat "(WARNING: patch-macos is deprecated, use `doom env refresh` instead)\n\n" - "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\" -l -c \"$pwd/RunEmacs $args\"") - (write-file oldbin) - (chmod oldbin (file-modes newbin))) - (message "%s successfully patched" appdir))))) + ((user-error "patch-macos has been disabled. Please use 'doom env refresh' instead")))))