Skip to content

Conversation

@cattyman919
Copy link
Contributor

PR Description

Issue

The setupterm function returns an vague error message of exit status 1 when $TERM variable is set to an invalid value.

> export TERM=skibidi
> infocmp: couldn't open terminfo file /usr/share/terminfo/s/skibidi.

This will return `exit status 1` in from the go program

func (tc *termcap) setupterm(name string) error {
cmd := exec.Command("infocmp", "-1", name)
output := &bytes.Buffer{}
cmd.Stdout = output
tc.strs = make(map[string]string)
tc.bools = make(map[string]bool)
tc.nums = make(map[string]int)
if err := cmd.Run(); err != nil {
return err
}

The error returns 'exit status 1' which is a vague error message to the user

Related Issue & PR

Trying to resolve jesseduffield/lazygit#4868
Related pull Request jesseduffield/lazygit#4881 (comment)

@gdamore gdamore merged commit d86b440 into gdamore:main Sep 23, 2025
@cattyman919 cattyman919 deleted the better-term-error branch September 24, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I catch an Error exit status 1

2 participants