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:
Anton Nikolaev
2020-01-17 03:48:04 -08:00
committed by Facebook Github Bot
parent 2f3b9e1be9
commit 73e0f9035a
4 changed files with 16 additions and 19 deletions

View File

@@ -111,7 +111,9 @@ compilePlugins(
pluginPaths,
path.join(flipperDir, 'plugins'),
).then(dynamicPlugins => {
process.env.PLUGINS = JSON.stringify(dynamicPlugins);
ipcMain.on('get-dynamic-plugins', event => {
event.returnValue = dynamicPlugins;
});
pluginsCompiled = true;
tryCreateWindow();
});