mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 03:26:07 +00:00
fix(db): log the demo baseline refusal through the logger, read the tool versions at once
This commit is contained in:
@@ -197,8 +197,9 @@ export async function refuseClientOlderThanServer(
|
||||
binDir: string | undefined,
|
||||
serverMajor: number,
|
||||
): Promise<void> {
|
||||
for (const tool of tools) {
|
||||
const major = await pgToolMajor(tool, binDir);
|
||||
const majors = await Promise.all(tools.map((tool) => pgToolMajor(tool, binDir)));
|
||||
for (const [i, tool] of tools.entries()) {
|
||||
const major = majors[i];
|
||||
if (major !== null && major >= serverMajor) continue;
|
||||
throw new Error(
|
||||
`${tool} is version ${major ?? 'unknown'}, older than the PostgreSQL ${serverMajor} server, which it cannot ` +
|
||||
|
||||
Reference in New Issue
Block a user