Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit ec8fb56

Browse files
committed
fix rubocop lint
1 parent 570ca42 commit ec8fb56

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Vagrantfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ def walk(obj, &fn)
4545
end
4646

4747
if File.exist?("#{host_project_dir}/composer.json")
48+
cconfig = {}
4849
composer_conf = JSON.parse(File.read("#{host_project_dir}/composer.json"))
49-
cconfig = composer_conf['extra']['drupalvm'] rescue Hash.new
50-
cconfig = Hash.new if cconfig.nil?
50+
if composer_conf['extra'] && composer_conf['extra']['drupalvm']
51+
cconfig = composer_conf['extra']['drupalvm']
52+
end
5153

5254
# If Drupal VM is a Composer dependency set the correct paths.
53-
if Dir.exists?("#{host_drupalvm_dir}/vendor/geerlingguy/drupal-vm")
55+
if Dir.exist?("#{host_drupalvm_dir}/vendor/geerlingguy/drupal-vm")
5456
host_project_dir = File.dirname(File.expand_path(__FILE__))
5557
host_drupalvm_dir = "#{host_project_dir}/vendor/geerlingguy/drupal-vm"
5658
host_config_dir = ENV['DRUPALVM_CONFIG_DIR'] ? "#{host_project_dir}/#{ENV['DRUPALVM_CONFIG_DIR']}" : host_project_dir

0 commit comments

Comments
 (0)