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

Allow config file to set ssl.verify usefully #200

Merged
merged 1 commit into from
Nov 10, 2012
Merged

Allow config file to set ssl.verify usefully #200

merged 1 commit into from
Nov 10, 2012

Conversation

temujin9
Copy link
Contributor

@temujin9 temujin9 commented Nov 9, 2012

The --ssl_verify flag has a default of true, which means it always overrides the ssl.verify config file option, even if it isn't selected. Making it default to nil, and adding the default further down the chain (in case neither cli nor config file expresses an opinion).

@@ -183,7 +183,7 @@ def upload
client_name: Berkshelf::Config.instance.chef.node_name,
client_key: Berkshelf::Config.instance.chef.client_key,
ssl: {
verify: (options[:ssl_verify] || Berkshelf::Config.instance.ssl.verify)
verify: (options[:ssl_verify] || Berkshelf::Config.instance.ssl.verify || true)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this fallback is necessary if we marked the option as required in the Berkshelf::Config

attribute 'ssl.verify',
  required: true,
  type: Boolean,
  default: true

Do you think this is a better approach?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can drop the second line change; the ssl.verify has that default already, I just missed it. No need to force it, I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok I'll merge this in and make this small change

@reset
Copy link
Contributor

reset commented Nov 9, 2012

another good catch!

reset added a commit that referenced this pull request Nov 10, 2012
Allow config file to set ssl.verify usefully
@reset reset merged commit 5297191 into berkshelf:master Nov 10, 2012
@temujin9
Copy link
Contributor Author

Thanks!

@berkshelf berkshelf locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants