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

Added warning if input of vault admin is other than array #352

Conversation

sanga1794
Copy link
Contributor

@sanga1794 sanga1794 commented Jun 25, 2020

Signed-off-by: sanga17 sausekar@msystechnologies.com

Description

Added warning if input of vault admin is other than array

Related Issue

Fixed: #219

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

@sanga1794 sanga1794 requested a review from a team June 25, 2020 10:15
@@ -26,6 +26,10 @@ def admins
vault_admins = Chef::Config[:knife][:vault_admins]
admin_array = [Chef::Config[:node_name]]

if !vault_admins.kind_of?(Array)
+ ui.warn("Vault admin is needed to be input as an array")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
+ ui.warn("Vault admin is needed to be input as an array")
+ ui.warn("Vault admin must be an array")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tas50 will update it, thanks

@sanga1794 sanga1794 requested a review from a team as a code owner July 30, 2020 11:47
Signed-off-by: sanga17 <sausekar@msystechnologies.com>
Signed-off-by: sanga17 <sausekar@msystechnologies.com>
@sanga1794 sanga1794 force-pushed the Fix_knife_vault_TypeError_no_implicit_conversion_of_String_into_Array branch from a4ec17b to 3c739c3 Compare August 3, 2020 14:15
@kagarmoe kagarmoe removed the request for review from a team August 6, 2020 22:46
@tas50 tas50 merged commit 2ea9c4c into chef:master Aug 18, 2020
@tas50
Copy link
Contributor

tas50 commented Aug 18, 2020

Thanks @sanga1794

@jerseyfoxcom
Copy link

Having an issue calling this from the Windows command line - If I try to use -A with any kind of parameter it always now complains that "Vault admin must be an array".

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.

knife vault - TypeError: no implicit conversion of String into Array
3 participants