mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 17:29:14 +00:00
Fixes #1938
This commit is contained in:
parent
ea51c9949f
commit
fa03ceef11
@ -100,9 +100,14 @@ module.exports = async function() {
|
|||||||
|
|
||||||
// Create `plugins.json` file.
|
// Create `plugins.json` file.
|
||||||
// Don't inject the plugins without an Admin
|
// Don't inject the plugins without an Admin
|
||||||
const existingPlugins = await Object.keys(this.plugins).filter(plugin =>
|
const existingPlugins = Object.keys(this.plugins).filter(plugin => {
|
||||||
fs.pathExists(path.resolve(this.config.appPath, 'plugins', plugin, 'admin', 'src', 'containers', 'App')),
|
try {
|
||||||
);
|
fs.accessSync(path.resolve(this.config.appPath, 'plugins', plugin, 'admin', 'src', 'containers', 'App'));
|
||||||
|
return true;
|
||||||
|
} catch(err) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const existingPluginsInfo = existingPlugins.map(id => ({
|
const existingPluginsInfo = existingPlugins.map(id => ({
|
||||||
id,
|
id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user