Skip to content

Commit

Permalink
Remove strip from capture to preserve whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
townsen committed Jul 25, 2014
1 parent db58fc3 commit 7d15a9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ appear at the top.

* Add your entries here, remember to credit yourself however you want to be
credited!
* Remove strip from capture to preserve whitespace. Nick Townsend
* Add vmware_fusion Vagrant provider. Nick Townsend

## 1.5.1
Expand Down
2 changes: 1 addition & 1 deletion lib/sshkit/backends/local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def execute(*args)

def capture(*args)
options = { verbosity: Logger::DEBUG }.merge(args.extract_options!)
_execute(*[*args, options]).full_stdout.strip
_execute(*[*args, options]).full_stdout
end

private
Expand Down
2 changes: 1 addition & 1 deletion test/functional/backends/test_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_capture
Local.new do
captured_command_result = capture(:echo, 'foo')
end.run
assert_equal 'foo', captured_command_result
assert_equal "foo\n", captured_command_result
end

def test_execute_raises_on_non_zero_exit_status_and_captures_stdout_and_stderr
Expand Down

0 comments on commit 7d15a9a

Please sign in to comment.