povils / phpmnd

PHP Magic Number Detector
MIT License
554 stars 46 forks source link

tput binary not found in alpine based images #158

Closed siemendev closed 2 years ago

siemendev commented 2 years ago

Hi folks, when using a alpine based docker image, there is no executable "tput" available, which results in the following output:

phpmnd version 2.5.0 by Povilas Susinskas

sh: tput: not found

--------------------------------------------------------------------------------

Total of Magic Numbers: 0
Time: 00:00.131, Memory: 17.15 MB

Here's the use: app/vendor/povils/phpmnd/src/Printer/Console.php:28 Even though there's a fallback, you may be able to work around that issue using Symfony\Component\Console\Application::getTerminalWidth() from symfony/console: https://symfony.com/blog/new-in-symfony-3-2-console-improvements-part-2

sidz commented 2 years ago

Even though there's a fallback, you may be able to work around that issue using Symfony\Component\Console\Application::getTerminalWidth()

Unfortunately we can't use as this method as it has been removed since 4.0 (proof https://github.com/symfony/console/blob/5.4/CHANGELOG.md#400)

Btw tput usage has been removed in the current master branch.

sidz commented 2 years ago

duplicates https://github.com/povils/phpmnd/issues/153