Skip to content

Commit e6caedd

Browse files
lroolleclaude
andcommitted
fix: honor explicit --config-home root for the bare-name auth store
CONFIG_ROOT layouts clear CONFIG_HOME; resolve bare names into <root>/<agent>/ instead of silently falling back to the XDG default. Also align docs on deva.sh invocation. Per review on #421. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 3e53cae commit e6caedd

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

agents/shared_auth.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,13 @@ resolve_absolute_path() {
246246
}
247247

248248
# Bare credential names (no slash) live in the agent config home — the store.
249+
# Explicit --config-home root layouts clear CONFIG_HOME and set CONFIG_ROOT
250+
# (deva.sh), so honor the root before falling back to the XDG default.
249251
auth_store_dir() {
250252
if [ -n "${CONFIG_HOME:-}" ]; then
251253
printf '%s' "$CONFIG_HOME"
254+
elif [ -n "${CONFIG_ROOT:-}" ]; then
255+
printf '%s/%s' "$CONFIG_ROOT" "${ACTIVE_AGENT:-claude}"
252256
elif command -v default_config_home_for_agent >/dev/null 2>&1; then
253257
default_config_home_for_agent "${ACTIVE_AGENT:-claude}"
254258
else

docs/authentication.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,12 @@ A bare `*.json` name (no slash) resolves against the agent config home
158158
(`~/.config/deva/claude/` by default) — a named credentials store:
159159

160160
```bash
161-
deva claude --auth-with claude-max.credentials.json
161+
deva.sh claude --auth-with claude-max.credentials.json
162162
# -> ~/.config/deva/claude/claude-max.credentials.json
163163
```
164164

165165
Resolution order: current directory first (compat), then the store.
166+
With an explicit `--config-home` root, the store is `<root>/<agent>/`.
166167
A missing bare name provisions into the store.
167168

168169
#### Provisioning new credentials

0 commit comments

Comments
 (0)