Pass plugins via ipc instead of env to fix loading of plugins on Windows
Summary: Fixed the issue with empty plugin list on Windows because of env var length limit Reviewed By: passy Differential Revision: D19411466 fbshipit-source-id: 7fa390f7dd342e23e965b2135fbeb8e88e5857ef
This commit is contained in:
committed by
Facebook Github Bot
parent
2f3b9e1be9
commit
73e0f9035a
@@ -21,7 +21,7 @@ import {
|
||||
addDisabledPlugins,
|
||||
addFailedPlugins,
|
||||
} from '../reducers/plugins';
|
||||
import {remote} from 'electron';
|
||||
import {ipcRenderer} from 'electron';
|
||||
import GK from '../fb-stubs/GK';
|
||||
import {FlipperBasePlugin} from '../plugin';
|
||||
import {setupMenuBar} from '../MenuBar';
|
||||
@@ -110,9 +110,7 @@ function getBundledPlugins(): Array<PluginDefinition> {
|
||||
export function getDynamicPlugins() {
|
||||
let dynamicPlugins: Array<PluginDefinition> = [];
|
||||
try {
|
||||
dynamicPlugins = JSON.parse(
|
||||
(remote && remote.process.env.PLUGINS) || process.env.PLUGINS || '[]',
|
||||
);
|
||||
dynamicPlugins = ipcRenderer.sendSync('get-dynamic-plugins');
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user