From bd0cfc0b40bc0eeb04c409c54678b3429ce5b677 Mon Sep 17 00:00:00 2001 From: Jay Mundrawala Date: Thu, 13 Aug 2015 05:28:00 -0700 Subject: Add to_s to ps_credential --- lib/chef/util/powershell/ps_credential.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/chef/util/powershell/ps_credential.rb b/lib/chef/util/powershell/ps_credential.rb index 01f8c27b6c..3f4558a77c 100644 --- a/lib/chef/util/powershell/ps_credential.rb +++ b/lib/chef/util/powershell/ps_credential.rb @@ -29,6 +29,10 @@ class Chef::Util::Powershell "New-Object System.Management.Automation.PSCredential('#{@username}',('#{encrypt(@password)}' | ConvertTo-SecureString))" end + def to_s + to_psobject + end + private def encrypt(str) -- cgit v1.2.1