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")
13
13
cconfig = load_composer_config ( "#{ host_project_dir } /composer.json" )
14
14
15
15
# If Drupal VM is a Composer dependency set the correct path.
16
- vendor_dir = `composer config vendor-dir` . strip
17
16
drupalvm_path = "#{ vendor_dir } /geerlingguy/drupal-vm"
18
17
if Dir . exist? ( "#{ host_project_dir } /#{ drupalvm_path } " )
19
18
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
66
66
/^[^\s ]+ (.+)$/ . match ( `#{ ansible_bin } --version` ) { |match | return match [ 1 ] }
67
67
end
68
68
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
+
69
79
# Require that if installed, the ansible version meets the requirements.
70
80
def require_ansible_version ( requirement )
71
81
return unless ansible_bin
You can’t perform that action at this time.
0 commit comments