actions / actions/runner

Support cli tools which feature detect ansi color support

Open
#750 0 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement future
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the enhancement
When running php based cli tools within a action, the color detection support does not work.
Most php cli tools are based on symfony/console which relies on a stream_isatty check to auto activate ansi color support.

I would expect GithubActions to support a running context which makes tools aware that ansi colors are supported and so they realize it and automatically use it.

My examples all mention php, but I guess a lot of tools (even non php) use a isatty-like check for feature detection.

Code Snippet
Use a php based project which contains a composer.json and run composer install.
Atm this does not support coloring and we need to force enable coloring with composer install --ansi which is tedious

Additional information
Also reported to composer at https://github.com/composer/composer/issues/9269

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with a PHP project containing composer.json and run composer install in GitHub Actions, comparing it with composer install --ansi. The report names no runner file or test, so first locate the runner's terminal capability handling and its existing tests. Done means supported CLI tools detect ANSI color automatically without requiring --ansi.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, php, symfony
Domain
ci-cd, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.