CRLF in certain files being replaced with LF whenever we execute `cordova run browser`
We're all on Windows 10, and running Cordova 8.1.2 ([email protected]).
Whenever any of us run cordova run browser, all of the CRLF newlines* in config.xml and package.json are replaced with LF newlines. Nothing else is modified other than the newlines. To our knowledge we haven't modified any Cordova settings other than installing the android and browser platforms.
*Except for the CRLFs in the <description> field of config.xml
Executing cordova run browserwith --verbose:
No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform browser
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in browser platform
No differences found between plugins added to project and installed in browser platform. Continuing...
Generating config.xml from defaults for platform "browser"
Merging and updating files from [www, platforms\browser\platform_www] to platforms\browser\www
delete platforms\browser\www\config.xml (no source)
copy platforms\browser\platform_www\manifest.json platforms\browser\www\manifest.json (updated file)
Executing script found in plugin cordova-plugin-browsersync for hook "after_prepare": plugins\cordova-plugin-browsersync\lib\pluginHook.js
No scripts found for hook "before_deploy".
No scripts found for hook "after_run".
Output of cordova platform ls
Installed platforms:
android 7.1.1
browser 5.0.4
Available platforms:
ios ~4.5.4
osx ~4.0.1
windows ~6.0.0
Yeah, this is an annoying bug. I did some work to extract what npm uses internally into a library that we can use, but we haven't updated cordova-lib/cordova-common to use it yet.
Ref https://github.com/apache/cordova-common/pull/34
This still happens to me and seems to be reported multiple times... :-( Let me know if there's something I can do in order to fix this.