Skip to content

Commit

Permalink
Don't autoinstall local files in package manager (#9242)
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Oct 1, 2023
1 parent 49c1077 commit 4499a71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/package-manager/src/NodePackageManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ export class NodePackageManager implements PackageManager {
} catch (e) {
if (
e.code !== 'MODULE_NOT_FOUND' ||
options?.shouldAutoInstall !== true
options?.shouldAutoInstall !== true ||
id.startsWith('.') // a local file, don't autoinstall
) {
if (
e.code === 'MODULE_NOT_FOUND' &&
Expand Down

0 comments on commit 4499a71

Please sign in to comment.