forked from svrjs/svrjs
Make generateServerString() function replace spaces in name property of svrjs.json with dashes.
This commit is contained in:
parent
7decde6b58
commit
b5de4b79c5
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Reference in a new issue