Skip to content

feat: surface direnv stderr when .envrc credential lookup fails - #3

Merged
Yhoorneman merged 1 commit into
mainfrom
feature/surface-direnv-credential-errors
Jun 5, 2026
Merged

feat: surface direnv stderr when .envrc credential lookup fails#3
Yhoorneman merged 1 commit into
mainfrom
feature/surface-direnv-credential-errors

Conversation

@Yhoorneman

Copy link
Copy Markdown
Contributor

When credentials fall back to a direnv-managed .envrc and the file runs but yields no usable DD_API_KEY/DD_APP_KEY (e.g. an internal Vault lookup returns 403/invalid token), echo direnv's stderr as the reason instead of only reporting the keys as missing.

  • load_direnv_env now returns (vars, stderr).
  • The missing-keys warning prints the diagnostic under "direnv reported:".
  • Tests updated for the new return type and the surfaced reason.

When credentials fall back to a direnv-managed .envrc and the file runs but
yields no usable DD_API_KEY/DD_APP_KEY (e.g. an internal Vault lookup returns
403/invalid token), echo direnv's stderr as the reason instead of only
reporting the keys as missing.

- load_direnv_env now returns (vars, stderr).
- The missing-keys warning prints the diagnostic under "direnv reported:".
- Tests updated for the new return type and the surfaced reason.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Yhoorneman
Yhoorneman merged commit d2e3b50 into main Jun 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant