Skip to content

Commit 2f5c937

Browse files
authored
Prevents the link: protocol from crashing when no package.json is used (#7337)
* Stops reading the manifest for link: dependencies * Prevents crashing when the package.json doesnt exist
1 parent 40546bf commit 2f5c937

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/resolvers/exotics/link-resolver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class LinkResolver extends ExoticResolver {
3030
const name = path.basename(loc);
3131
const registry: RegistryNames = 'npm';
3232

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

0 commit comments

Comments
 (0)