local backend does not return last newline
grosser opened this issue · 2 comments
grosser commented
SSHKit::Backend::Local.new(&->(*){ capture "echo", "1" }).run
"1"
mattbrictson commented
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!
grosser commented
Thx for the quick reply.
Kinda strange default, but I guess changing this now would cause lots of
havoc :D
…On Wed, Feb 6, 2019 at 5:47 PM Matt Brictson ***@***.***> wrote:
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!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#450 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAsZzrBwuLhr3a5GNSq1Z9wrj1nMLGGks5vK4WXgaJpZM4amV6f>
.