fix(server): outdated gh no longer reads as "not authenticated" (#7588)

This commit is contained in:
Theo Browne authored and GitHub committed 2026-08-19 16:35:30 -04:00
1 parent 8c85b4933f
commit 51341f2ac1
4 files changed
+29 -2

No files matched your search

@@ -381,3 +381,18 @@ it("reports unauthenticated when GitHub JSON has accounts but none are valid", (
},
);
});
it("reports an update hint instead of unauthenticated when gh predates --json", () => {
const auth = GitHubSourceControlProvider.discovery.parseAuth(
processResult("", {
stderr: "unknown flag: --json\n\nUsage: gh auth status [flags]\n",
exitCode: ChildProcessSpawner.ExitCode(1),
}),
);
assert.strictEqual(auth.status, "unknown");
assert.match(
Option.getOrElse(auth.detail, () => ""),
/2\.81\.0/,
);
});