Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "..." instead of ellipsis on UTF-8 failure. #58

Merged
merged 1 commit into from
Jul 22, 2015

Conversation

mattbrictson
Copy link
Owner

This can happen when SSHKit returns stdout/stderr data in raw ASCII-8BIT form.

@robd Does this look like a good fix for #57?

@mattbrictson
Copy link
Owner Author

Argh for the life of me I cannot get the test working on Windows. I'll come back to this later! 😠

@robd
Copy link
Contributor

robd commented Jul 22, 2015

Yes this does look good.

I think ideally, it would strip off 2 more chars from the end of the line in ASCII mode. When I tried substituting the 3 periods, it caused the lines to wrap with the last 2 periods on the following line. But looking at your test, it seems like it somehow does this already since it asserts that the total length including the 3 periods is 11 (10 chars + the newline). I can't understand how this works, but it seems to do the right thing!

Good luck with windowz.

This can happen when SSHKit returns stdout/stderr data in raw ASCII-8BIT form.
@mattbrictson
Copy link
Owner Author

@robd Thanks for reviewing! I think I finally have the Windows issue fixed.

mattbrictson added a commit that referenced this pull request Jul 22, 2015
Use "..." instead of ellipsis on UTF-8 failure.
@mattbrictson mattbrictson merged commit 4933559 into master Jul 22, 2015
@mattbrictson mattbrictson deleted the ascii-truncation branch January 2, 2017 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants