From 48326bf95b3ee5fbc7f26b25fbd945033693da8d Mon Sep 17 00:00:00 2001 From: Adrien Waksberg Date: Sat, 2 Jan 2021 17:42:04 +0100 Subject: [PATCH] fix: choice box for generate new password was ignored --- CHANGELOG.md | 4 ++++ gpm/cli.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 614955d..dea01bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/) ## Unreleased +### Fixed + +- Choice box for generate new password was ignored + ## v2.0.0 - 2020-12-23 ### Changed diff --git a/gpm/cli.go b/gpm/cli.go index b4105d3..0cf718d 100644 --- a/gpm/cli.go +++ b/gpm/cli.go @@ -291,8 +291,9 @@ func (c *Cli) UpdateEntry(entry Entry) bool { if c.ChoiceBox("Generate a new random password ?", false) { entry.Password = RandomString(c.Config.PasswordLength, c.Config.PasswordLetter, c.Config.PasswordDigit, c.Config.PasswordSpecial) + } else { + entry.Password = c.InputBox("Password", "", true) } - entry.Password = c.InputBox("Password", "", true) entry.OTP = c.InputBox("OTP Key", entry.OTP, false) entry.Comment = c.InputBox("Comment", entry.Comment, false)