From 445842ce23f1a07d85051a137298a6f17d44fde5 Mon Sep 17 00:00:00 2001 From: Ziya Suzen Date: Wed, 15 Nov 2023 16:15:26 +0000 Subject: [PATCH] Linter fixes --- tests/helpers/cluster.ts | 2 +- tests/helpers/launcher.ts | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/helpers/cluster.ts b/tests/helpers/cluster.ts index b96a1a93..c7fcc825 100644 --- a/tests/helpers/cluster.ts +++ b/tests/helpers/cluster.ts @@ -48,7 +48,7 @@ if (argv.h || argv.help) { // Windows can't handle signals to stop/start chaos if (Deno.build.os === "windows" && !argv["chaos"]) { - console.log("use --chaos flag to restart cluster servers randomly") + console.log("use --chaos flag to restart cluster servers randomly"); } const count = argv["count"] as number || 3; diff --git a/tests/helpers/launcher.ts b/tests/helpers/launcher.ts index a24fac1f..daf70135 100644 --- a/tests/helpers/launcher.ts +++ b/tests/helpers/launcher.ts @@ -81,7 +81,8 @@ function getTmpFolder() { let tmpDir = Deno.env.get("TMPDIR"); if (!tmpDir) { // Unix or Windows home - tmpDir = pathNorm(Deno.env.get("HOME") || Deno.env.get("USERPROFILE")) + "/tmp"; + tmpDir = pathNorm(Deno.env.get("HOME") || Deno.env.get("USERPROFILE")) + + "/tmp"; } const tmp = pathNorm(`${tmpDir}/nats_launcher`); Deno.mkdirSync(tmp, { recursive: true }); @@ -547,11 +548,8 @@ export class NatsServer implements PortInfo { static async start(conf?: any, debug = false): Promise { const isWindows = Deno.build.os === "windows"; - const exe = Deno.env.get("CI") - ? "nats-server/nats-server" - : isWindows - ? "nats-server.exe" - : "nats-server"; + const natsServerExe = isWindows ? "nats-server.exe" : "nats-server"; + const exe = Deno.env.get("CI") ? "nats-server/nats-server" : natsServerExe; const tmp = getTmpFolder(); conf = NatsServer.confDefaults(conf); conf.ports_file_dir = tmp;