From 1d17761b23ba35ff1ce5cc8d2176695ba0c878f2 Mon Sep 17 00:00:00 2001 From: miya0001 Date: Sun, 19 Jul 2015 15:54:17 +0900 Subject: [PATCH] add xdebug and fix bug installing theme --- Vagrantfile | 2 +- provision/site-cookbooks/wpcli/recipes/install.rb | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 827c285..c60fb97 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -102,7 +102,7 @@ Vagrant.configure(2) do |config| :listen_ports => ['80', '443'] }, :php => { - :packages => %w(php php-cli php-devel php-mbstring php-gd php-xml php-mysql), + :packages => %w(php php-cli php-devel php-mbstring php-gd php-xml php-mysql php-pecl-xdebug), :directives => { 'default_charset' => 'UTF-8', 'mbstring.language' => 'neutral', diff --git a/provision/site-cookbooks/wpcli/recipes/install.rb b/provision/site-cookbooks/wpcli/recipes/install.rb index a9ce6dd..4c40d4f 100644 --- a/provision/site-cookbooks/wpcli/recipes/install.rb +++ b/provision/site-cookbooks/wpcli/recipes/install.rb @@ -180,13 +180,7 @@ user node[:wpcli][:user] group node[:wpcli][:group] cwd File.join(node[:wpcli][:wp_docroot], node[:wpcli][:wp_siteurl]) - code "WP_CLI_CONFIG_PATH=#{Shellwords.shellescape(node[:wpcli][:config_path])} wp theme install #{Shellwords.shellescape(node[:wpcli][:default_theme])}" - end - bash "WordPress #{node[:wpcli][:default_theme]} activate" do - user node[:wpcli][:user] - group node[:wpcli][:group] - cwd File.join(node[:wpcli][:wp_docroot], node[:wpcli][:wp_siteurl]) - code "WP_CLI_CONFIG_PATH=#{Shellwords.shellescape(node[:wpcli][:config_path])} wp theme activate #{File.basename(Shellwords.shellescape(node[:wpcli][:default_theme])).sub(/\..*$/, '')}" + code "WP_CLI_CONFIG_PATH=#{Shellwords.shellescape(node[:wpcli][:config_path])} wp theme install #{Shellwords.shellescape(node[:wpcli][:default_theme])} --activate" end end