fix: use effective home for legacy zai auth fallback

This commit is contained in:
Peter Steinberger
2026-02-22 11:58:14 +00:00
parent 09017b77a2
commit c7ff12ef29
2 changed files with 10 additions and 2 deletions

View File

@@ -174,7 +174,9 @@ describe("resolveProviderAuths key normalization", () => {
);
});
it("falls back to legacy .pi auth file for zai keys", async () => {
it("falls back to legacy .pi auth file for zai keys even after os.homedir() is primed", async () => {
// Prime os.homedir() to simulate long-lived workers that may have touched it before HOME changes.
os.homedir();
await withSuiteHome(
async (home) => {
await writeLegacyPiAuth(