MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / resolveBindHost

Function resolveBindHost

scripts/bind-host.mjs:26–32  ·  view source on GitHub ↗
({ flag, env } = {})

Source from the content-addressed store, hash-verified

24 * CLI `--host` wins, then `OH_BIND_HOST`, then loopback.
25 */
26export function resolveBindHost({ flag, env } = {}) {
27 const fromFlag =
28 flag != null && String(flag).trim() !== "" ? String(flag).trim() : null;
29 const fromEnv =
30 env != null && String(env).trim() !== "" ? String(env).trim() : null;
31 return fromFlag || fromEnv || DEFAULT_BIND_HOST;
32}
33
34export function bindHostArgs(host) {
35 return ["--host", host || DEFAULT_BIND_HOST];

Callers 3

buildConfigFunction · 0.90
buildConfigFunction · 0.90
bind-host.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected