Fix installer setting bad controller_url

The host.controller_url config is required to end with a / for the url
joining logic to work.  Fix code added #619 setting this to a value not
ending with a /.
This commit is contained in:
Hornwitser committed 2024-09-03 21:58:45 +02:00
1 parent a1856e6edf
commit 5a73a73c36
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -904,7 +904,7 @@ async function main() {
let hostToken = result.stdout.split("\n").slice(-2)[0];
// Default to localhost on correct port for host in standalone mode
await execHost(["config", "set", "host.controller_url", `http://localhost:${answers.httpPort}`]);
await execHost(["config", "set", "host.controller_url", `http://localhost:${answers.httpPort}/`]);
await execHost(["config", "set", "host.controller_token", hostToken]);
await execHost(["config", "set", "host.public_address", answers.publicAddress]);
await execHost(["config", "set", "host.factorio_directory", answers.factorioDir]);
+1 -1
View File
@@ -45,7 +45,7 @@ describe("Integration of create tool", function () {
assert.equal(hostConfig["host.name"], "local");
assert.equal(hostConfig["host.public_address"], "localhost");
assert.equal(hostConfig["host.factorio_directory"], "test/factorio");
assert.equal(hostConfig["host.controller_url"], "http://localhost:8099");
assert.equal(hostConfig["host.controller_url"], "http://localhost:8099/");
}).timeout(1200000);
it("should create a new controller installation", async function () {
this.skip();