aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-09-08 22:10:14 +0100
committerMax Howell2009-09-10 18:16:49 +0100
commit9f07e5d9fd226f9333b9a1241a4576d9e894f1b2 (patch)
tree864cb098ab7e917707098432813c3734060f1c84 /Library
parentc92e56697616d136bb068ddcf6d07b2fb05991e7 (diff)
downloadbrew-9f07e5d9fd226f9333b9a1241a4576d9e894f1b2.tar.bz2
Handle $EDITOR with spaces
Fixes Homebrew/homebrew#40
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index d01436c78..2a8dff002 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -91,5 +91,8 @@ def exec_editor *args
editor='vim'
end
end
- exec editor, *args
+ # we split the editor because especially on mac "mate -w" is common
+ # but we still want to use the comma-delimited version of exec because then
+ # we don't have to escape args, and escaping 100% is tricky
+ exec *(editor.split+args)
end