[PR #11998] fix(test): git init with a default test user #14022

Open
opened 2026-02-16 18:18:50 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11998

State: open
Merged: No


What does this PR do?

when a user have $XDG_CONFIG_HOME set on their system, git looks for global config in the $XDG_CONFIG_HOME directory, since preload sets the $XDG_CONFIG_HOME to a temp directory, the git resolution fails leading to failing tests because init exited with an error.

screenshot from my system below, I have $XDG_CONFIG_HOME set to the ~/.config directory

image

How did you verify your code works?

I have been using this default user setup for a while now so that I can run tests locally, but I am tired of keeping it staged and stashing for every branch, so decided to open the PR finally.

screenrecording

https://github.com/user-attachments/assets/7f4ab1d0-2885-4e49-8515-1b84bbf754e7

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11998 **State:** open **Merged:** No --- ### What does this PR do? when a user have $XDG_CONFIG_HOME set on their system, git looks for global config in the $XDG_CONFIG_HOME directory, since preload sets the $XDG_CONFIG_HOME to a temp directory, the git resolution fails leading to failing tests because init exited with an error. *screenshot from my system below, I have $XDG_CONFIG_HOME set to the ~/.config directory* <img width="2528" height="1533" alt="image" src="https://github.com/user-attachments/assets/650003a5-3718-4290-9c4e-baa3f78a1a61" /> ### How did you verify your code works? I have been using this default user setup for a while now so that I can run tests locally, but I am tired of keeping it staged and stashing for every branch, so decided to open the PR finally. *screenrecording* https://github.com/user-attachments/assets/7f4ab1d0-2885-4e49-8515-1b84bbf754e7
yindo added the pull-request label 2026-02-16 18:18:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14022