fix(cmd): ensure GITEA_HOST can be read #23
Reference in New Issue
Block a user
No description provided.
Delete Branch "flynnhou/gitea-mcp:fix/docker-host-env-not-updated"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
With the following configuration:
after mcp-client calling a tool, the gitea client will encounter the following fatal error:
Turns out the root cause was because the
GITEA_HOST
environment variable wasn't overriding the default flag value, resulting in mismatch of host and access token.The if statement won't be entered
Due to
host
could never be evaluated as an empty string from the default value"http://gitea.com"
Unless user specify
gitea-mcp ... --host <empty_string> ...
with environmentGITEA_HOST=<non_empty_string>
at the same time, which is very unlikely IMHO.How
host
flag default value fromGITEA_HOST
environment variable value