Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
derevnjuk committed Apr 17, 2024
2 parents 6b0a928 + 06fad30 commit fcf4ce8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Utils/Helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface CommandArgs {

export interface ClusterArgs {
cluster?: string;
hostname?: string;
}

export interface ClusterUrls {
Expand Down Expand Up @@ -54,11 +55,13 @@ export class Helpers {
let bus: string;
let api: string;

if (args.cluster) {
let host = args.cluster;
const hostname = args.cluster ?? args.hostname;

if (hostname) {
let host = hostname;

try {
({ host } = new URL(args.cluster as string));
({ host } = new URL(hostname));
} catch {
// noop
}
Expand Down

0 comments on commit fcf4ce8

Please sign in to comment.