-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Saving sh files always uses Windows line breaks #10594
Comments
@vesrah PR #10346 makes line endings a preference, but that has not yet been merged. Currently, Brackets should call the |
I pulled the code and ran the setup_for_hacking.sh - success with that PR. Thank you! |
@vesrah You shouldn't need to hack the code for this to work correctly. The file is more than one line long before you open it in Brackets, right? Brackets should auto-detect the existing line endings and preserve those when saving. The Could you use Debug > Show Developer Tools to put a breakpoint in |
Now that you mentioned the first 1000 bytes: It's also possible that the first line of his file is longer than 1000 chars. |
@marcelgerber Only if you edit them, which presumably is pretty unlikely. I don't think anyone's looked at the performance hit of scanning larger lengths, but it would be easy to bump up the cutoff if needed. Shouldn't be a factor here though: most shell scripts start with a short |
Brackets 1.1.0-15558 / OSX 10.10
Creating or editing a .sh file and trying to run it comes back with:
/bin/bash^M: bad interpreter: No such file or directory
If you open the file in vim, set the file format to unix, and save it then the script works fine. Reopening the file in brackets and saving it will cause the issue to happen again.
The text was updated successfully, but these errors were encountered: