From 9f07e5d9fd226f9333b9a1241a4576d9e894f1b2 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Tue, 8 Sep 2009 22:10:14 +0100 Subject: [PATCH] Handle $EDITOR with spaces Fixes Homebrew/homebrew#40 --- Library/Homebrew/utils.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index d01436c78e..2a8dff0023 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