From 9b346bb257c1812d544c387f14982838b4ff5827 Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Sat, 4 Jan 2020 11:51:54 -0800 Subject: registered commands, return types --- src/server/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/server/index.ts') 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); } -- cgit v1.2.3-70-g09d2