mirror of https://github.com/databricks/cli.git
clean ups
This commit is contained in:
parent
30638351f8
commit
0c5fa24fd7
|
@ -59,7 +59,7 @@ func initProgressLoggerFlag(cmd *cobra.Command, logFlags *logFlags) *progressLog
|
|||
// Configure defaults from environment, if applicable.
|
||||
// If the provided value is invalid it is ignored.
|
||||
if v, ok := env.Lookup(cmd.Context(), envProgressFormat); ok {
|
||||
_ = f.ProgressLogFormat.Set(v)
|
||||
_ = f.Set(v)
|
||||
}
|
||||
|
||||
flags := cmd.PersistentFlags()
|
||||
|
|
|
@ -200,15 +200,11 @@ func (l *Logger) writeAppend(event Event) {
|
|||
func (l *Logger) writeInplace(event Event) {
|
||||
if l.isFirstEvent {
|
||||
// save cursor location
|
||||
if _, err := l.Writer.Write([]byte("\033[s")); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
_ = l.Writer.Write([]byte("\033[s"))
|
||||
}
|
||||
|
||||
// move cursor to saved location
|
||||
if _, err := l.Writer.Write([]byte("\033[u")); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
_ = l.Writer.Write([]byte("\033[u"))
|
||||
|
||||
// clear from cursor to end of screen
|
||||
_, _ = l.Writer.Write([]byte("\033[0J"))
|
||||
|
|
Loading…
Reference in New Issue