capybara-inline-screenshot
capybara-inline-screenshot copied to clipboard
gem outputs iterm2 image output, even when that is not a good idea
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:

I've thought of a couple of ways to work around this but I'm not sure what you'd want:
- Never output iTerm2 codes if
$output.isattyis false (not 100% sure this would work with ST3, as colours come through fine, so it might be pretending to be a TTY) - toggle via environment variable (although this won't work well with things like zeus)
- toggle via config option
Hrmm is that a bug in sublime text 3 I wonder? Should it not ignore unknown escape codes?
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.