Nvveen / Gotty

Gotty is a library written in Go that provides interpretation and loading of Termcap database files.
3 stars 7 forks source link

Handle terminfo envvar #2

Open ijc opened 7 years ago

ijc commented 7 years ago

As reported in https://github.com/docker/docker/issues/32400 (née https://github.com/docker/for-mac/issues/1515) setting $TERMINFO leads to a panic because OpenTermInfo has no code to handle this case.

This PR cleans up a bunch of stuff in that function and adds the missing case for when $TERMINFO is set.

NB I also include https://github.com/ijc25/Gotty/commit/f56504781b6b0704731705d2d411076a24b04c0f which is also in #1 so that go fmt -s is clean.

thaJeztah commented 7 years ago

See you just pushed; I just added another comment https://github.com/Nvveen/Gotty/pull/2#discussion_r110135030 :joy:

ijc commented 7 years ago

I'll leave squashing until @Nvveen requests it.

andriisoldatenko commented 5 years ago

@ijc @thaJeztah @Nvveen any luck to merge this?

thaJeztah commented 5 years ago

For Docker/Moby, we replaced this dependency with https://github.com/morikuni/aec, which is slightly more maintained, and was already in use by some other tools (see https://github.com/moby/moby/pull/38398)