Early exit on TERM=unknown

Merged Johann Dreo requested to merge github/fork/schopin-pro/patch-1 into master

Created by: schopin-pro

When running in non-interactive environments sometimes the TERM is set to 'unknown' rather than being unset, e.g. https://askubuntu.com/questions/1091553/how-do-i-fix-error-opening-terminal-unknown-on-ubuntu-server

It's surprisingly hard to manufacture a situation where this occurs (I've been trying for the past 30mn, but my tools seem too clever for their own goods), but the issue was seen at least once in the Ubuntu test suite, which is why they carry a similar patch (see http://launchpadlibrarian.net/356118225/liquidprompt_1.11-3_1.11-3ubuntu1.diff.gz because I couldn't find a public link with the raw patch itself).

The failing tests: https://autopkgtest.ubuntu.com/results/autopkgtest-bionic/bionic/amd64/l/liquidprompt/20180206_154026_dc5c9@/log.gz

Merge request reports