formula = Coresys::Formula.find(ARGV[0])
error!("EDITOR environment variable is not set") unless ENV['EDITOR']
file = (Coresys.formula + formula.file_name).to_s + '.rb'
exec ENV['SHELL'], '-c', ENV['EDITOR'] + ' "$@"', '--', file

error!("EDITOR environment variable is not set") unless ENV['EDITOR']
file = Coresys.formula + "#{ARGV[0].downcase}.rb"
exec ENV['SHELL'], '-c', ENV['EDITOR'] + ' "$@"', '--', file

Edit shouldn't require formula to be valid
Edit shouldn't require formula to be valid
