theory / tap-parser-sourcehandler-pgtap

TAP::Parser::SourceHandler::pgTAP
http://search.cpan.org/dist/TAP::Parser::SourceHandler::pgTAP
10 stars 13 forks source link

--color doesn't work even with Term::ANSIColor #26

Open xenoterracide opened 4 years ago

xenoterracide commented 4 years ago

running pg_prove from a docker container as so

docker run -v $PWD/path/to/testdir:/t -e "PGPASSWORD=$PGPASSWORD" --network=host xenoterracide/pg_prove:latest \
  pg_prove --host localhost --dbname mydb --username postgres --ext .sql --recurse --color /t

here's how this container is created https://github.com/xenoterracide/postgis-pgtap/blob/master/pgprove/Dockerfile

FROM alpine:latest
RUN apk add --update-cache perl perl-utils perl-module-build perl-dbi perl-dbd-pg postgresql-client \
 && rm -rf /var/cache/apk/*
RUN cpan TAP::Parser::SourceHandler::pgTAP Term::ANSIColor && rm -r ~/.cpan
CMD ['pg_prove', '--help']

but my output still isn't colorized. If needed I can provide a github actions test of this.

theory commented 4 years ago

Try setting TERM=xterm-256color in the container.

xenoterracide commented 4 years ago

does not appear to work

          docker run -v $PWD/src/test/resources/pgtap/shared/script:/t \
            -e "PGPASSWORD=$PGPASSWORD" \
            -e "TERM=xterm-256color" \
            --network=host xenoterracide/pg_prove:latest \
            pg_prove --host localhost --dbname production --username postgres --ext .sql --recurse --color /t
xenoterracide commented 4 years ago

maybe a duplicate of #23 hard to tell at this juncture

theory commented 3 years ago

Does it work with the official Docker image?