Merge pull request #233 from sticky-note/fix/composer

fix(composer): stop hanging by preventing interaction
This commit is contained in:
sticky-note 2022-08-27 11:05:15 +11:00 committed by GitHub
commit da3e183fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,9 +45,9 @@ update-composer:
cmd.run:
- name: "{{ install_file }} selfupdate"
{% if grains['os_family'] == 'FreeBSD' %}
- unless: test $(date -v+60d -j -f "%Y-%m-%d %H:%M:%S" "$({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
- unless: test $(date -v+60d -j -f "%Y-%m-%d %H:%M:%S" "$({{ install_file }} --version --no-interaction | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
{% else %}
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
- unless: test $(date -d "60 days $({{ install_file }} --version --no-interaction | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
{% endif %}
- cwd: {{ php.lookup.pkgs.local_bin }}
- env: