Files
ydflowandydflow 7f86919865 fix(cli): trim env credentials in auth token output (#4696)
EnvCredential gates activeness on the trimmed env value and
buildClientFromEnv trims before authenticating, but `auth token` emitted
os.Getenv(kind) raw. A WEKNORA_TOKEN / WEKNORA_API_KEY carrying stray
padding or a trailing newline (common when CI secret stores materialize
env vars) was therefore emitted verbatim: the CLI's own requests
succeeded while every captured $(weknora auth token) substitution sent
whitespace-bearing credentials.

Emit strings.TrimSpace(os.Getenv(kind)) so the scripting helper exposes
the same credential value the CLI itself sends.

Co-authored-by: ydflow <314143294+ydflow@users.noreply.github.com>
2026-10-26 13:43:45 +08:00
..
…
…
…
…
…
…