Skip to content

Commit

Permalink
Remove creates property for drush init
Browse files Browse the repository at this point in the history
Under Drush `9.x`, the initialization was failing in the case of
a pre-provisioned box which didn't yet have `drush.yml`.

That caused aliases to not work.

`drush init` is inherently idempotent.  It won't copy files that
already exist, and it won't add to `.bash_profile` if the additions
are already there.
  • Loading branch information
kentr committed Oct 7, 2018
1 parent d370690 commit 14c21b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
path: "~/.bashrc"
state: touch

# `drush init` is inherently idempotent. It won't copy files that
# already exist, and it won't add to `.bash_profile` if the additions
# are already there.
- name: Run `drush init`.
become: no
command: drush init -y
args:
creates: ~/.drush/drush.bashrc
chdir: "{{ drupal_core_path }}"

- block:
Expand Down

0 comments on commit 14c21b4

Please sign in to comment.