deivid-rodriguez/pry-byebug

less: unrecognized option: X

iqqmuT opened this issue · 1 comments

I'm running pry-byebug in Alpine Linux 3.14.2 Docker container and I get a following error when trying to debug a variable:

[1] pry(#<SpreadsheetParser>)> spreadsheet
less: unrecognized option: X
BusyBox v1.33.1 () multi-call binary.

Usage: less [-EFIMmNSRh~] [FILE]...

View FILE (or stdin) one screenful at a time

	-E	Quit once the end of a file is reached
	-F	Quit if entire file fits on first screen
	-I	Ignore case in all searches
	-M,-m	Display status line with line numbers
		and percentage through the file
	-N	Prefix line number to each line
	-S	Truncate long lines
	-R	Remove color escape codes in input
	-~	Suppress ~s displayed past EOF

Apparently pry-byebug does not support less from BusyBox.

I ran into this issue also and was able to work around it by adding the following instruction to my Dockerfile:

RUN apk add --update --no-cache less

(You could also add less to an existing list of packages installed via the RUN instruction, of course.)

The solution above was found on this page: https://negabaro.github.io/archive/docker-rails-less