Skip to content
This repository was archived by the owner on Jun 30, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions providers/composer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@

remote_file "#{new_resource.project_path}/composer.phar" do
source "http://getcomposer.org/composer.phar"
mode "0774"
not_if do
::File.exists?("#{new_resource.project_path}/composer.phar")
if ::File.exists?("#{new_resource.project_path}/composer.phar")
mode "0774"
end
end
new_resource.updated_by_last_action(true)
Expand All @@ -34,10 +33,9 @@
action :install_packages do
execute "install dependencies with composer #{new_resource.name}" do
cwd new_resource.project_path
user "root"
command "php composer.phar install"
only_if do
::File.exists?("#{new_resource.project_path}/composer.json")
if ::File.exists?("#{new_resource.project_path}/composer.json")
user "root"
command "php composer.phar install"
end
end
new_resource.updated_by_last_action(true)
Expand Down