fix(cli): fix set client of instance when passing token and base url

This commit is contained in:
Ruben Fiszel
2024-10-03 16:49:20 +02:00
parent b54c9ee657
commit 794c4cde3c

View File

@@ -190,6 +190,12 @@ export async function pickInstance(
const instances = await allInstances();
if (opts.baseUrl && opts.token) {
log.info("Using instance fully defined by --base-url and --token");
setClient(
opts.token,
opts.baseUrl.endsWith("/") ? opts.baseUrl.slice(0, -1) : opts.baseUrl
);
return {
name: "custom",
remote: opts.baseUrl,