CRLF in certain files being replaced with LF whenever we execute `cordova run browser`
- Dominant language
- JavaScript
- Stars
- 967
- Forks
- 344
- Avg merge
- 8h 41m
- Merged PRs (30d)
- 9
Description
We're all on Windows 10, and running Cordova 8.1.2 (cordova-lib@8.1.1).
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 \ field of config.xml
Executing `cordova run browser`with `--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
```
Contributor guide
Research direction
Reproduce the issue on Windows 10 with Cordova 8.1.2, using the reported project platforms and `cordova run browser`. Compare line endings in `config.xml` and `package.json` before and after the command, including the exception in the `` field, and use the verbose output to identify which step changes them. Done means the command no longer replaces the affected CRLF newlines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100