drop any color changes before attaching to container

This commit is contained in:
Dawid Dziurla 2019-07-11 20:46:52 +02:00
parent ec5f96a1eb
commit 87ddc04634
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B

View file

@ -399,7 +399,8 @@ func (c *Container) Attach() error {
output := os.Stdout
clearScreen := "\033[2J"
showCursor := "\033[?25h"
_, _ = io.Copy(output, strings.NewReader(clearScreen+showCursor))
noColor := "\033[0m"
_, _ = io.Copy(output, strings.NewReader(clearScreen+showCursor+noColor))
_, _ = io.Copy(output, hijack.Conn)
channel <- syscall.SIGINT
}()