From 2965b12f62abe75be15d376cee5f3226fc88cc82 Mon Sep 17 00:00:00 2001 From: Nan Zhong Date: Tue, 30 Oct 2012 11:27:36 -0400 Subject: [PATCH] redis: fix error on new install when redis.conf does not exist Closes Homebrew/homebrew#15754. Signed-off-by: Mike McQuaid --- Formula/redis.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/redis.rb b/Formula/redis.rb index f7e0beaf685..2522d94a702 100644 --- a/Formula/redis.rb +++ b/Formula/redis.rb @@ -31,7 +31,7 @@ class Redis < Formula end # Fix redis upgrade from 2.4 to 2.6. - if File.readlines(etc/'redis.conf').grep(/^vm-enabled/) + if File.exists?(etc/'redis.conf') && File.readlines(etc/'redis.conf').grep(/^vm-enabled/) mv etc/'redis.conf', etc/'redis.conf.old' ohai "Your redis.conf will not work with 2.6; moved it to redis.conf.old" end