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

CRLF in certain files being replaced with LF whenever we execute cordova run browser #353

Open
RolandMunsil opened this issue Oct 12, 2018 · 2 comments
Labels

Comments

@RolandMunsil
Copy link

RolandMunsil commented Oct 12, 2018

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
@dpogue dpogue added the bug label Oct 12, 2018
@dpogue
Copy link
Member

dpogue commented Oct 12, 2018

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 apache/cordova-common#34

@HarelM
Copy link

HarelM commented Mar 30, 2020

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.

dpogue added a commit to dpogue/cordova-lib that referenced this issue Jun 2, 2020
This also includes fixes for writing package.json with the correct
newlines, which should address the complaints raised in [1] and possibly
[2].

1. apache/cordova-cli#353
2. apache#694
dpogue added a commit to dpogue/cordova-lib that referenced this issue Jun 2, 2020
This also includes fixes for writing package.json with the correct
newlines, which should address the complaints raised in [1] and possibly
[2].

1. apache/cordova-cli#353
2. apache#694
erisu pushed a commit to apache/cordova-lib that referenced this issue Jun 3, 2020
* GH-832: Look at devDeps for restoring platforms

This also includes fixes for writing package.json with the correct
newlines, which should address the complaints raised in [1] and possibly
[2].

1. apache/cordova-cli#353
2. #694

* Ensure a failure to restore stops the build

This has been a recurring frustration over several years, and nobody can
seem to explain why we would want to silently ignore restore failures
for platforms and plugins rather than surfacing them and failing the
remainder of the build steps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants