Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
Added return value when using the reset_password method
Browse files Browse the repository at this point in the history
  • Loading branch information
KrauseFx committed Oct 9, 2015
1 parent 2cb1d04 commit 0a854e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/credentials_manager/account_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ def password

# Call this method to ask the user to re-enter the credentials
# @param force: if false the user is asked before it gets deleted
# @return: Did the user decide to remove the old entry and enter a new password?
def invalid_credentials(force: false)
puts "The login credentials for '#{user}' seem to be wrong".red
if force || agree("Do you want to re-enter your password? (y/n)", true)
puts "Removing Keychain entry for user '#{user}'...".yellow
remove_from_keychain
ask_for_login
return true
end
false
end

private
Expand Down

0 comments on commit 0a854e1

Please sign in to comment.