Open mike-north opened 6 years ago
Related information about detecting merge conflicts: https://github.com/rust-lang/rust/issues/36879
Just to save additional searching, https://github.com/rust-lang/rust/issues/32059 is another issue related to this.
One possible strategy for solving this: when we detect a parse failure when trying to read package.json
, check it for conflict markers with a straightforward regex match on the string contents of the package.json
file and report a more specific error type if so; otherwise, return the original error type.
NOTE: this issue predates this project's rename to Volta.
Repro Instructions
Create a repo with this package.json
package.json
```json { "name": "ember-cli-document-title-northm", "version": "0.0.0-development", "description": "Adding document title functionality to your ember app", "keywords": [ "ember-addon" ], "homepage": "https://github.com/mike-north/ember-cli-document-title-northm", "bugs": { "url": "https://github.com/mike-north/ember-cli-document-title-northm/issues" }, "license": "MIT", "author": "Mike Northand then attempt to run
yarn
The error
As a user, I'd want some information about my
package.json
being non-json or otherwise malformed -- maybe even providing an indication of where the problem exists in the json file.