capistrano/sshkit

local backend does not return last newline

grosser opened this issue · 2 comments

SSHKit::Backend::Local.new(&->(*){ capture "echo", "1" }).run
"1"

The capture method strips trailing white space by default. This applies to all backends. You can disable this behavior using strip: false, like this:

SSHKit::Backend::Local.new(&->(*){ capture "echo", "1", strip: false }).run

Hope that helps!