Test load globally installed plugins (#3546)

This commit is contained in:
Peter Hedenskog 2022-01-29 14:40:48 +01:00 committed by GitHub
parent 4afd47fa30
commit 3d58b6628b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -66,9 +66,13 @@ module.exports = {
try {
plugins.push(require(path.resolve(process.cwd(), name)));
} catch (error) {
console.error("Couldn't load plugin %s: %s", name, err); // eslint-disable-line no-console
// if it fails here, let it fail hard
throw error;
try {
plugins.push(require(name));
} catch (error) {
console.error("Couldn't load plugin %s: %s", name, err); // eslint-disable-line no-console
// if it fails here, let it fail hard
throw error;
}
}
}
}