capybara-inline-screenshot icon indicating copy to clipboard operation
capybara-inline-screenshot copied to clipboard

gem outputs iterm2 image output, even when that is not a good idea

Open mipearson opened this issue 10 years ago • 2 comments

Added this gem to our project so that we'd get nice inlined images in buildkite output.

Unfortunately, in sublime text 3's test runner, we get:

image

I've thought of a couple of ways to work around this but I'm not sure what you'd want:

  1. Never output iTerm2 codes if $output.isatty is false (not 100% sure this would work with ST3, as colours come through fine, so it might be pretending to be a TTY)
  2. toggle via environment variable (although this won't work well with things like zeus)
  3. toggle via config option

mipearson avatar Sep 21 '15 07:09 mipearson

Hrmm is that a bug in sublime text 3 I wonder? Should it not ignore unknown escape codes?

toolmantim avatar Sep 22 '15 18:09 toolmantim

I realize this is pretty old, but I also see this output on a Linux machine. Not sure why.

It looks like:

]1337;File=name=c2NyZWVuc2hvdF8yMDE0LTEwLTI3LTA3LTAwLTAyLjQ3Ni5wbmc=;inline=1:iVBORw0KGgo...

It's running inside tmux inside a docker container inside a Linux host, so it's possible that something along that line is not doing the right thing with unknown escape codes. But it'd be nice if there was some way to just disable it if you know that it won't work.

ibrahima avatar May 09 '18 00:05 ibrahima