diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-04 11:51:54 -0800 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-04 11:51:54 -0800 |
| commit | 9b346bb257c1812d544c387f14982838b4ff5827 (patch) | |
| tree | 078fd307d8ec5f23ae6d1835483aa4a57ba1eae2 /src/server/index.ts | |
| parent | 19b62446a1f05048c6fa940ea4cd7a94021d4ab1 (diff) | |
registered commands, return types
Diffstat (limited to 'src/server/index.ts')
| -rw-r--r-- | src/server/index.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index 0a5b4afae..287725537 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -25,9 +25,12 @@ import { Logger } from "./ProcessFactory"; import { yellow } from "colors"; import { Session } from "./Session/session"; import { isMaster } from "cluster"; +import { execSync } from "child_process"; if (isMaster) { - Session.initializeMaster(); + Session.initializeMaster().then(repl => { + repl.registerCommand("pull", [], () => execSync("git pull", { stdio: ["ignore", "inherit", "inherit"] })); + }); } else { Session.initializeWorker(launch); } |
