Skip to content

Commit

Permalink
fix(@embark/console): ensure Cockpit is only started in non-secondary…
Browse files Browse the repository at this point in the history
… mode (#2026)

`embark console` registers and tries to spin up `Cockpit`, even when there's already
a Cockpit instance running and thefore exits with an error that a certain port is already
in use.

This commit ensures that Cockpit is only bootstrapped when `embark console` is
executed as a non-secondary process, meaning that there's no other `embark run`
process active that might occupy Cockpit's default port.
  • Loading branch information
0x-r4bbit authored and iurimatias committed Nov 5, 2019
1 parent abe79c8 commit b0e71d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/embark/src/cmd/cmd_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ class EmbarkController {
engine.registerModuleGroup("webserver");
engine.registerModuleGroup("filewatcher");
engine.registerModuleGroup("storage");
engine.registerModuleGroup("cockpit");
if (!isSecondaryProcess(engine)) {
engine.registerModuleGroup("cockpit");
}
engine.registerModulePackage('embark-deploy-tracker', {plugins: engine.plugins});

callback();
Expand Down

0 comments on commit b0e71d9

Please sign in to comment.