Files
Hermes-ui/packages/server
sir1st eea1d1decd fix(auth): use path.dirname for credential dir on Windows (#1148)
Provider auth controllers derived the credential directory with
`authPath.substring(0, authPath.lastIndexOf('/'))`. On Windows paths use
backslashes, so `lastIndexOf('/')` returns -1 and the slice yields an
empty string, making `mkdirSync('')` throw
`ENOENT: no such file or directory, mkdir ''` during OAuth login.

Replace the manual slicing with the cross-platform `path.dirname()` in
codex-auth (auth.json + codex CLI token paths), xai-auth, and nous-auth.

Fixes Codex/xAI/Nous login on Windows.

Co-authored-by: xingzhi <chuzihao.czh@alibaba-inc.com>
2026-05-30 16:31:00 +08:00
..