Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint: Fix [602] Don't compare to empty string #1141

Merged
merged 1 commit into from
Jan 19, 2020

Conversation

tangrufus
Copy link
Member

@tangrufus tangrufus commented Jan 15, 2020

@@ -7,9 +7,9 @@
no_log: true
changed_when: false
when:
- composer_authentication.hostname is defined and composer_authentication.hostname != ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need to check these? Seems pretty defensive. By default they just aren't defined right? So this is only guarding against people defining them with no value?

Copy link
Member Author

@tangrufus tangrufus Jan 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need it (at least the password one) because of password defaults to empty string. See:

site_packagist_org_authentications:
- { hostname: repo.packagist.com, username: token, password: "{{ vault_wordpress_sites[site].packagist_token | default('') }}" }
site_composer_authentications: "{{ vault_wordpress_sites[site].composer_authentications | default([]) }}"
composer_authentications: "{{ site_packagist_org_authentications + site_composer_authentications }}"

I suggest we remove all 3 when conditions when we depercate packagist_token

@tangrufus tangrufus merged commit ab70d8e into roots:master Jan 19, 2020
@tangrufus tangrufus deleted the lint-602 branch January 19, 2020 18:18
tangrufus added a commit to tangrufus/trellis that referenced this pull request Jan 22, 2020
swalkinshaw pushed a commit that referenced this pull request Apr 4, 2020
#1141 bases on ansible/ansible-lint#457 (comment)
which depends on ansible/ansible#51030 which merged into anisble v2.8.0.
swalkinshaw pushed a commit that referenced this pull request Apr 6, 2020
#1141 bases on ansible/ansible-lint#457 (comment)
which depends on ansible/ansible#51030 which merged into anisble v2.8.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants