lib/capistrano/tasks/plugins_composer_install.rake in wp-capistrano3-0.0.33 vs lib/capistrano/tasks/plugins_composer_install.rake in wp-capistrano3-0.0.34
- old
+ new
@@ -3,13 +3,15 @@
task :plugins_composer_install do
on roles(:app) do
pluginDirectory = "../app/web/wp-content/plugins/"
Dir.foreach(pluginDirectory) { |directory|
- if (directory != "." and directory != "..")
+ if (directory != "." and directory != ".." && File.directory?(pluginDirectory + directory))
puts "#################################\n# Plugin #{directory}\n#################################"
Dir.chdir(pluginDirectory + directory) do
puts
+ info(Dir.exist?(Dir.pwd + '/vendor'))
+ info(File.exist?(Dir.pwd + '/composer.lock'))
if (Dir.exist?(Dir.pwd + '/vendor') == false && File.exist?(Dir.pwd + '/composer.lock') == true)
puts '=> NEED INSTALL : There is no vendor installed and composer.lock'
execute "ls #{release_path}/wp-content/plugins/"
execute "composer install --working-dir=#{release_path}/wp-content/plugins/" + directory
else