check database.yml path

This commit is contained in:
Christian Mehlmauer
2016-01-21 20:32:32 +01:00
parent 5a0e11fb72
commit 478cd2ed5c
+3 -1
View File
@@ -11,7 +11,9 @@ end
# Must be explicit as activerecord is optional dependency
require 'active_record/railtie'
unless File.exist?('config/database.yml') || File.exist?(File.expand_path('~/.msf4/database.yml'))
require 'metasploit/framework/database'
# check if database.yml is present
unless Metasploit::Framework::Database.configurations_pathname.try(:to_path)
fail 'RSPEC currently needs a configured database'
end