Skip to content

Commit

Permalink
Prevents the link: protocol from crashing when no package.json is used (
Browse files Browse the repository at this point in the history
yarnpkg#7337)

* Stops reading the manifest for link: dependencies

* Prevents crashing when the package.json doesnt exist
  • Loading branch information
arcanis authored and Vincent Bailly committed Jun 10, 2020
1 parent 7d80282 commit 0d55af3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resolvers/exotics/link-resolver.js
Expand Up @@ -30,7 +30,7 @@ export default class LinkResolver extends ExoticResolver {
const name = path.basename(loc);
const registry: RegistryNames = 'npm';

const manifest: Manifest = !await fs.exists(loc)
const manifest: Manifest = !await fs.exists(`${loc}/package.json`)
? {_uid: '', name, version: '0.0.0', _registry: registry}
: await this.config.readManifest(loc, this.registry);

Expand Down

0 comments on commit 0d55af3

Please sign in to comment.