Skip to content

Commit

Permalink
Fix start plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ziulev committed Dec 3, 2021
1 parent 9cc2dd9 commit 062059d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/providers/plugins.provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,12 @@ export const PluginsProvider: FC<{}> = (props) => {
}

const start = async (plugin: string, port: number) => {
await shell.execute(`forever stop ${plugin}`);
const list = await shell.execute(`forever list ${plugin}`);
const started = list.includes(plugin);
if (started) {
await shell.execute(`forever stop ${plugin}`);
}

await shell.execute(`forever start ${plugin} ${port}`);
setTimeout(() => connect(plugin, port), 1000);
}
Expand Down

0 comments on commit 062059d

Please sign in to comment.