From 0c9d7fc58051c0cdadb515a4c63006c4a00a9d2f Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 20 Oct 2020 16:55:00 -0500 Subject: [PATCH] Only create databases when enabled --- scripts/homestead.rb | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/homestead.rb b/scripts/homestead.rb index 403bf2648..e4c205beb 100644 --- a/scripts/homestead.rb +++ b/scripts/homestead.rb @@ -534,16 +534,20 @@ def self.configure(config, settings) end settings['databases'].each do |db| - config.vm.provision 'shell' do |s| - s.name = 'Creating MySQL Database: ' + db - s.path = script_dir + '/create-mysql.sh' - s.args = [db] + if enabled_databases.include? 'mysql' + config.vm.provision 'shell' do |s| + s.name = 'Creating MySQL Database: ' + db + s.path = script_dir + '/create-mysql.sh' + s.args = [db] + end end - config.vm.provision 'shell' do |s| - s.name = 'Creating Postgres Database: ' + db - s.path = script_dir + '/create-postgres.sh' - s.args = [db] + if enabled_databases.include? 'postgresql' + config.vm.provision 'shell' do |s| + s.name = 'Creating Postgres Database: ' + db + s.path = script_dir + '/create-postgres.sh' + s.args = [db] + end end if enabled_databases.include? 'mongodb'