Separate persistent mutable state from config

That way, we clearly see which things are not change, and we also
clearly see which things are persistent.
This commit is contained in:
Aleksey Kladov 2020-03-16 19:23:38 +01:00
parent 2e9b6320e6
commit ae662617a2
7 changed files with 80 additions and 65 deletions

View file

@ -5,7 +5,7 @@ import { spawnSync } from 'child_process';
export function serverVersion(ctx: Ctx): Cmd {
return async () => {
const binaryPath = await ensureServerBinary(ctx.config);
const binaryPath = await ensureServerBinary(ctx.config, ctx.state);
if (binaryPath == null) {
throw new Error(