From b5de4b79c5ac1c38f5c9eb6c546c07c85ffdbc5e Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 25 Aug 2024 13:13:16 +0200 Subject: [PATCH] Make generateServerString() function replace spaces in name property of svrjs.json with dashes. --- src/utils/generateServerString.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/generateServerString.js b/src/utils/generateServerString.js index 802469c..c0ff35a 100644 --- a/src/utils/generateServerString.js +++ b/src/utils/generateServerString.js @@ -4,7 +4,7 @@ const getOS = require("./getOS.js"); function generateServerString(exposeServerVersion) { return exposeServerVersion - ? name + + ? name.replace(/ /g, "-") + "/" + version + " (" + @@ -14,7 +14,7 @@ function generateServerString(exposeServerVersion) { ? "Bun/v" + process.versions.bun + "; like Node.JS/" + process.version : "Node.JS/" + process.version) + ")" - : name; + : name.replace(/ /g, "-"); } module.exports = generateServerString;