-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update bubbletea package. Reenable TTY detection #193
Conversation
@@ -62,7 +62,7 @@ func NewMultiBar(id string, data progressData) *progressbar { | |||
id: id, | |||
maxNameWidth: maxNameWidth, | |||
Data: data, | |||
isTTY: isatty.IsTerminal(os.Stdout.Fd()) && false, // FIXME: re-enable the detection | |||
isTTY: isatty.IsTerminal(os.Stdout.Fd()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still support piping args into cnspec
? If not, maybe we can remove some code here (lines 84-96):
// else if not a TTY (but piped?)
else {
go func() {
for {
time.Sleep(time.Second / progressPipedFps)
if p.Data.complete {
break
}
fmt.Print(p.View() + "\r\033[2A")
}
fmt.Print(p.View())
}()
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, lets revisit that if we can simplify the approach here
454d2ce
to
54e13c7
Compare
rebased on #192 |
@@ -62,7 +62,7 @@ func NewMultiBar(id string, data progressData) *progressbar { | |||
id: id, | |||
maxNameWidth: maxNameWidth, | |||
Data: data, | |||
isTTY: isatty.IsTerminal(os.Stdout.Fd()) && false, // FIXME: re-enable the detection | |||
isTTY: isatty.IsTerminal(os.Stdout.Fd()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, lets revisit that if we can simplify the approach here
Signed-off-by: Preslav <preslav@mondoo.com>
54e13c7
to
885bd5b
Compare
Fixes #167