diff --git a/apps/server/src/diagnostics/ProcessDiagnostics.test.ts b/apps/server/src/diagnostics/ProcessDiagnostics.test.ts index 42a3189489..54f486faee 100644 --- a/apps/server/src/diagnostics/ProcessDiagnostics.test.ts +++ b/apps/server/src/diagnostics/ProcessDiagnostics.test.ts @@ -258,25 +258,28 @@ describe("ProcessDiagnostics", () => { if (error._tag !== "ProcessDiagnosticsQueryFailedError") { assert.fail(`Expected ProcessDiagnosticsQueryFailedError, got ${error._tag}`); } - assert.deepStrictEqual({ - command: error.command, - argCount: error.argCount, - cwd: error.cwd, - exitCode: error.exitCode, - stdoutBytes: error.stdoutBytes, - stderrBytes: error.stderrBytes, - stdoutTruncated: error.stdoutTruncated, - stderrTruncated: error.stderrTruncated, - }, { - command: "ps", - argCount: 2, - cwd: process.cwd(), - exitCode: 17, - stdoutBytes: 22, - stderrBytes: 21, - stdoutTruncated: false, - stderrTruncated: false, - }); + assert.deepStrictEqual( + { + command: error.command, + argCount: error.argCount, + cwd: error.cwd, + exitCode: error.exitCode, + stdoutBytes: error.stdoutBytes, + stderrBytes: error.stderrBytes, + stdoutTruncated: error.stdoutTruncated, + stderrTruncated: error.stderrTruncated, + }, + { + command: "ps", + argCount: 2, + cwd: process.cwd(), + exitCode: 17, + stdoutBytes: 22, + stderrBytes: 21, + stdoutTruncated: false, + stderrTruncated: false, + }, + ); assert.equal( error.message, `Process diagnostics query 'ps' failed with exit code 17 in '${process.cwd()}'.`, diff --git a/apps/server/src/diagnostics/ProcessDiagnostics.ts b/apps/server/src/diagnostics/ProcessDiagnostics.ts index ba09262ec9..b0a91eb303 100644 --- a/apps/server/src/diagnostics/ProcessDiagnostics.ts +++ b/apps/server/src/diagnostics/ProcessDiagnostics.ts @@ -253,7 +253,9 @@ function normalizeWindowsProcessRecord(record: WindowsProcessRecord): Option.Opt pgid: null, status: Option.getOrElse(nonEmptyString(record.Status), () => "Live"), cpuPercent: optionalNumberOrElse(record.PercentProcessorTime, (value) => Math.max(0, value)), - rssBytes: optionalNumberOrElse(record.WorkingSetSize, (value) => Math.max(0, Math.round(value))), + rssBytes: optionalNumberOrElse(record.WorkingSetSize, (value) => + Math.max(0, Math.round(value)), + ), elapsed: "", command: commandLine.value, });