Skip to content

Commit

Permalink
Update WP theme paths only when template_root in releases_path (#840)
Browse files Browse the repository at this point in the history
The update is needed only to fix the release subdirectory,
so it is safest to condition the update upon the releases_path
being in the template_root. This avoids overwriting less common
template_root values such as subdirectories of plugins, etc.
  • Loading branch information
fullyint authored Jun 15, 2017
1 parent e5fbe4f commit 049d269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/deploy/hooks/finalize-after.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
command: wp option set {{ item }} {{ deploy_helper.new_release_path }}/web/wp/wp-content/themes
args:
chdir: "{{ deploy_helper.current_path }}"
when: wp_template_root.stdout != '' and wp_template_root.stdout != '/themes'
when: deploy_helper.releases_path in wp_template_root.stdout
with_items:
- stylesheet_root
- template_root
Expand Down

0 comments on commit 049d269

Please sign in to comment.