Skip to content
Myr

pty.go

This file

Path

spin/pty.go

22 lines · 374 bytes · Go

Last changed by

fix: lint issues (#909)Carlos Alexandro Beckerbefore adoption817c4bd

History of this file

Take it

fix(spin): preserve color output when `--show-output` is given (#850)Andrey Neringbefore adoption93f6857

lines 1–12why, one step back
1package spin
23import (4 "os"56 "github.com/charmbracelet/x/term"7 "github.com/charmbracelet/x/xpty"8)910func openPty(f *os.File) (pty xpty.Pty, err error) {11 width, height, err := term.GetSize(f.Fd())12 if err != nil {

fix: lint issues (#909)Carlos Alexandro Beckerbefore adoption817c4bd

line 13why, one step back
13 return nil, err //nolint:wrapcheck

fix(spin): preserve color output when `--show-output` is given (#850)Andrey Neringbefore adoption93f6857

lines 14–17why, one step back
14 }
1516 pty, err = xpty.NewPty(width, height)17 if err != nil {

fix: lint issues (#909)Carlos Alexandro Beckerbefore adoption817c4bd

line 18why, one step back
18 return nil, err //nolint:wrapcheck

fix(spin): preserve color output when `--show-output` is given (#850)Andrey Neringbefore adoption93f6857

lines 19–22why, one step back
19 }
2021 return pty, nil22}