Re: win-test: unknown terminal "xterm-256color", was Re: [RFC PATCH 6/6] ls-tree: introduce '--pattern' option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 28, 2023 at 03:59:42PM -0400, Jeff King wrote:

> At any rate, unconditionally setting TERM=dumb should cover all cases,
> I'd think. I'm happy to prepare a patch.

Hmph. So I started to do this, and notice there are a bunch of tput
calls in the ci/ scripts themselves.

So if I do a dummy workflow like this:

-- >8 --
name: fake ci
on: [push, pull_request]
jobs:
  ubuntu:
    runs-on: ubuntu-latest
    steps:
      - name: check TERM
        run: |
          echo TERM=$TERM
          echo $(tput setaf 1)this is setaf 1$(tput sgr0)
  windows:
    runs-on: windows-latest
    steps:
      - name: check TERM
        shell: bash
        run: |
          echo TERM=$TERM
          echo $(tput setaf 1)this is setaf 1$(tput sgr0)
-- 8< --

then I note two interesting things:

  - the attempted colorization does nothing on ubuntu, because it's
    already TERM=dumb

  - the colorization on windows works! But I thought it was exactly
    these sorts of tputs that are causing the error messages.

So now I'm more confused than ever. I have a feeling we would be better
off just using ansi codes instead of tput, as Johannes suggested
earlier. But given the twists and turns here, and the fact that nobody
really seems that bothered by the status quo, I'm inclined to just leave
it alone for now.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux