Files
openclaude/src
0xfandomandGitHub 9bf9926805 fix(mcp): preserve ":-" inside ${VAR:-default} default values (#1933)
expandEnvVarsInString split the ${VAR:-default} syntax with
varContent.split(':-', 2). The code comment says the limit is there to
"preserve :- in defaults", but JavaScript's String.split(sep, limit) caps
the array length and discards the remainder — it is not a maxsplit that
glues the tail back on. So a default that itself contains ':-' is
truncated at the first occurrence: ${VAR:-a:-b} expands to "a" instead of
bash's "a:-b".

Slice at the first ':-' with indexOf so any later ':-' stays in the
default. This runs over user .mcp.json command/args/env/url/headers values.
Add coverage for the ':-'-in-default case plus set/unset/empty-default and
missing-var paths.
2026-07-13 16:18:57 +08:00
..
2026-06-11 07:59:18 +08:00
2026-06-11 07:59:18 +08:00
2026-06-11 07:59:18 +08:00
2026-06-11 07:59:18 +08:00
2026-06-11 07:59:18 +08:00