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

Prevents the link: protocol from crashing when no package.json is used #7337

Merged
merged 2 commits into from Jun 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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