fix: x-platform loop output

See coop-cloud/organising#178.
This commit is contained in:
2021-12-27 03:55:42 +01:00
parent 34cdb9c9d8
commit 2ba1ec3df0
3 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,8 @@ import (
"coopcloud.tech/abra/cli/internal"
"coopcloud.tech/abra/pkg/autocomplete"
"coopcloud.tech/abra/pkg/client"
stack "coopcloud.tech/abra/pkg/upstream/stack"
"github.com/buger/goterm"
"github.com/docker/cli/cli/command/formatter"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
@ -30,9 +32,11 @@ var appPsCommand = &cli.Command{
return nil
}
// TODO: how do we make this update in-place in an x-platform way?
goterm.Clear()
for {
goterm.MoveCursor(1, 1)
showPSOutput(c)
goterm.Flush()
time.Sleep(2 * time.Second)
}
},