diff options
author | mjarkk <mkopenga@gmail.com> | 2018-12-09 13:04:19 +0100 |
---|---|---|
committer | mjarkk <mkopenga@gmail.com> | 2018-12-09 13:04:19 +0100 |
commit | f14effe5f5d72ef5344be9d6e3057cca7c6d2c81 (patch) | |
tree | f1e1a01cce311d4989d0a9a9d52e17d7a83726b3 /pkg/commands/os.go | |
parent | efb82a58aea920b21c6c715dc0ee37012ad4cebb (diff) |
Worked and fixed a view comments
Diffstat (limited to 'pkg/commands/os.go')
-rw-r--r-- | pkg/commands/os.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/commands/os.go b/pkg/commands/os.go index faf6c5aec..037f6da2e 100644 --- a/pkg/commands/os.go +++ b/pkg/commands/os.go @@ -87,7 +87,10 @@ func (c *OSCommand) DetectUnamePass(command string, ask func(string) string) err } for askFor, prompt := range prompts { - if match, _ := regexp.MatchString(prompt.pattern, ttyText); match && prompt.canAskFor { + if !prompt.canAskFor { + continue + } + if match, _ := regexp.MatchString(prompt.pattern, ttyText); match { prompt.canAskFor = false ttyText = "" return ask(askFor) |