Wp-cli: Command less not available on the current machine

Created on 23 Dec 2019  路  3Comments  路  Source: wp-cli/wp-cli

Bug Report

Describe the current, buggy behavior

Running wp-cli without any arguments tries to open less. This will not work if less is not installed.

Describe how other contributors can replicate this bug

  • run wp-cli
  • wait a couple seconds
  • it returns sh: 1: less: not found

Describe what you expect as the correct outcome

Maybe a simple manual page like you would get with --help

Let us know what environment you are running this on
Ubuntu Docker

OS:     Linux 5.3.16-300.fc31.x86_64 #1 SMP Fri Dec 13 17:59:04 UTC 2019 x86_64
Shell:
PHP binary:     /usr/local/bin/php
PHP version:    7.2.4
php.ini used:
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /var/www/html
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:  /var/www/html/wp-cli.yml
WP-CLI version: 2.4.0

Provide a possible solution

Provide additional context/screenshots
grafik

windows framework

Most helpful comment

Well yeah. I mean I kind of get that. But it would be cool if less wasn't a dependency for this. Often docker containers don't come with less. POSIX operating systems usually come with more, which would probaply a better alternative.

See: https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html

All 3 comments

apt-get update && apt-get install less

The above command solved the issue to me

Well yeah. I mean I kind of get that. But it would be cool if less wasn't a dependency for this. Often docker containers don't come with less. POSIX operating systems usually come with more, which would probaply a better alternative.

See: https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html

I didn't get around to test it at home yet, but the MR is ready in case one of the maintainers feels like testing it and merging it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

killown picture killown  路  3Comments

AndrewCloss picture AndrewCloss  路  3Comments

schlessera picture schlessera  路  4Comments

sir-gon picture sir-gon  路  4Comments

vercotux picture vercotux  路  3Comments