fix(core): Allow loading nodes from multiple custom directories (#11130)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-10-07 12:09:47 +02:00 committed by GitHub
parent 4434668135
commit 1b84b0e5e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -260,7 +260,7 @@ export class LoadNodesAndCredentials {
dir: string, dir: string,
) { ) {
const loader = new constructor(dir, this.excludeNodes, this.includeNodes); const loader = new constructor(dir, this.excludeNodes, this.includeNodes);
if (loader.packageName in this.loaders) { if (loader instanceof PackageDirectoryLoader && loader.packageName in this.loaders) {
throw new ApplicationError( throw new ApplicationError(
picocolors.red( picocolors.red(
`nodes package ${loader.packageName} is already loaded.\n Please delete this second copy at path ${dir}`, `nodes package ${loader.packageName} is already loaded.\n Please delete this second copy at path ${dir}`,