guardian icon indicating copy to clipboard operation
guardian copied to clipboard

Coloring output discards command color information

Open didactic-drunk opened this issue 3 years ago • 0 comments

To reproduce compare crystal spec, crystal build, etc running within and without guardian.

  • Without guardian errors are red, pending has it's own easily skipped color, etc.
  • Within guardian the entire command output is grey and to my impaired vision almost unreadable.

I suggest replacing

output = `#{command}`
output.lines.each do |line|
  puts "  #{line.gsub(/\n$/, "").colorize(:dark_gray)}"
end

With:

system command

system solves another problem with long running commands not showing output until exit with the current code.

didactic-drunk avatar May 18 '21 17:05 didactic-drunk