Skip to content

Add --ansi option to force table output when not running in a TTY #57

@someonewithpc

Description

@someonewithpc

I looked through the code but wasn't able to figure out where the difference comes from, but when running this command from a git pre-commit hook, docker exec -it fails with the error the input device is not a TTY, and without the -it option, the output is not formatted into tables.

Tools like PHPStan and PHP-CS-fixer have a --ansi/--no-ansi option which would be helpful here.

I managed to work around this by running the command with < /dev/tty.

Specifically, the following:

make doc-check < /dev/tty
# where this make target runs bin/php-doc-check
# which runs:
docker exec -it container /path/vendor/bin/php-doc-check folders

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions