This repository was archived by the owner on Feb 13, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ if File.exist?("#{host_project_dir}/composer.json")
1313 cconfig = load_composer_config ( "#{ host_project_dir } /composer.json" )
1414
1515 # If Drupal VM is a Composer dependency set the correct path.
16- vendor_dir = `composer config vendor-dir` . strip
1716 drupalvm_path = "#{ vendor_dir } /geerlingguy/drupal-vm"
1817 if Dir . exist? ( "#{ host_project_dir } /#{ drupalvm_path } " )
1918 host_drupalvm_dir = "#{ host_project_dir } /#{ drupalvm_path } "
Original file line number Diff line number Diff line change @@ -66,6 +66,16 @@ def ansible_version
6666 /^[^\s ]+ (.+)$/ . match ( `#{ ansible_bin } --version` ) { |match | return match [ 1 ] }
6767end
6868
69+ # Return the path to the composer executable
70+ def composer_bin
71+ @composer_bin ||= which ( 'composer' )
72+ end
73+
74+ # Return Composer's vendor directory.
75+ def vendor_dir
76+ @vendor_dir ||= composer_bin ? `#{ composer_bin } config vendor-dir` . strip : 'vendor'
77+ end
78+
6979# Require that if installed, the ansible version meets the requirements.
7080def require_ansible_version ( requirement )
7181 return unless ansible_bin
You can’t perform that action at this time.
0 commit comments