summaryrefslogtreecommitdiffstats
path: root/pkg/commands/os.go
diff options
context:
space:
mode:
authormjarkk <mkopenga@gmail.com>2018-12-09 13:04:19 +0100
committermjarkk <mkopenga@gmail.com>2018-12-09 13:04:19 +0100
commitf14effe5f5d72ef5344be9d6e3057cca7c6d2c81 (patch)
treef1e1a01cce311d4989d0a9a9d52e17d7a83726b3 /pkg/commands/os.go
parentefb82a58aea920b21c6c715dc0ee37012ad4cebb (diff)
Worked and fixed a view comments
Diffstat (limited to 'pkg/commands/os.go')
-rw-r--r--pkg/commands/os.go5
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)