From 058f557f6afeeca3f7a21ae91b6339a0fcb408fa Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 20 Sep 2014 11:42:19 -0500 Subject: [PATCH] Stop invoking the editor through an interactive shell This was added in d2ecfb9 / Homebrew/homebrew#12784 to fix a bug repotted in Homebrew/homebrew#12779, but at that time we were invoking the editor via `system` rather than `exec`. Now we are using exec, and running it through an interactive shell seems to cause other problems, for example, emacs does not suspend/resume properly. Fixes Homebrew/homebrew#32328. --- Library/Homebrew/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index fa2f430e3d..ede63b5f6b 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -212,7 +212,7 @@ end def safe_exec cmd, *args # This buys us proper argument quoting and evaluation # of environment variables in the cmd parameter. - exec "/bin/sh", "-i", "-c", cmd + ' "$@"', "--", *args + exec "/bin/sh", "-c", "#{cmd} \"$@\"", "--", *args end # GZips the given paths, and returns the gzipped paths