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

file_read returns text with WINDOWS_EOL on UNIX_EOL files? #22

Open
eykd opened this issue Oct 16, 2011 · 2 comments
Open

file_read returns text with WINDOWS_EOL on UNIX_EOL files? #22

eykd opened this issue Oct 16, 2011 · 2 comments

Comments

@eykd
Copy link

eykd commented Oct 16, 2011

In using file_update in concert with text_ensure_lines, I find that my remote files are being converted from unix-style \n to windows-style \r\n. I see nothing obviously wrong with the code of any of the involved functions, and yet this is the behavior I'm consistently observing (using emacs to detect the EOL-style).

Of course, you can imagine the havoc this creates when encountered by BASH (and its rather fragile grasp on the reality). :)

This one frankly makes absolutely no sense to me. I hope it makes sense to you.

@eykd
Copy link
Author

eykd commented Oct 16, 2011

Looking at it, the results of file_read() have the \r\n in them (and with emacs I can confirm that the target file uses unix newlines), so this is before text_detect_eol. Would this be a problem with fabric? Is it something in python's universal newline handling? What the heck?

@sebastien
Copy link
Owner

Hmm, that's really weird. You could try to implement a test case in "tests/all.py", as the test module does not use Fabric, so it would be easy to spot where it comes from.

Also, if you could share a simple test case using Fabric, I'd be happy to test it and help debug it.

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

No branches or pull requests

2 participants