Skip to content

Commit

Permalink
check if remote url is defined first (#2384)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcm390 authored Jan 16, 2025
1 parent f8b9e3e commit afaca20
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1101,9 +1101,10 @@ const checkPortAvailable = (port: number): Promise<boolean> => {
});
};

const hasValidRemoteUrls = () =>
process.env.REMOTE_CHARACTER_URLS != "" &&
process.env.REMOTE_CHARACTER_URLS.startsWith("http")
const hasValidRemoteUrls = () => {
const remoteUrls = process.env.REMOTE_CHARACTER_URLS;
return remoteUrls && remoteUrls !== "" && remoteUrls.startsWith('http');
};

const startAgents = async () => {
const directClient = new DirectClient();
Expand Down

0 comments on commit afaca20

Please sign in to comment.