mirror of
https://github.com/mudler/luet.git
synced 2025-09-04 16:50:50 +00:00
Massive UX rewrite
- Ditch multiple libraries for progressbar, spinner, colors and replace with pterm - Detect when running on terminal and disable automatically spinner - Add support for multiple progress bars - Huge rewrite of the configuration part. No more crazy stuff with viper CLI commands now correctly overrides default config file as expected - Limit banner to be displayed on relevant parts Fixes #211 Fixes #105 Fixes #247 Fixes #233
This commit is contained in:
17
pkg/helpers/terminal/terminal_check_general.go
Normal file
17
pkg/helpers/terminal/terminal_check_general.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// +build !windows,!nacl,!plan9
|
||||
|
||||
package terminal
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
func IsTerminal(w io.Writer) bool {
|
||||
switch v := w.(type) {
|
||||
case *os.File:
|
||||
return isTerminal(int(v.Fd()))
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user