Skip to content

Commit 90c82c2

Browse files
authored
Retrieve the latest stable version from GitHub
1 parent 390061a commit 90c82c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/version.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function parseVersionRange(
3232
return { range: "latest", kind: "rc" };
3333
}
3434

35-
if (version === "latest") {
35+
if (version === "latest" || version === "stable") {
3636
return { range: "latest", kind: "stable" };
3737
}
3838

@@ -145,11 +145,11 @@ async function resolveLTS(): Promise<Version | null> {
145145
async function resolveRelease(range: string): Promise<Version | null> {
146146
if (range === "latest") {
147147
const res = await fetchWithRetries(
148-
"https://dl.deno.land/release-latest.txt",
148+
"https://github.com/denoland/deno/raw/refs/heads/main/cli/lib/version.txt",
149149
);
150150
if (res.status !== 200) {
151151
throw new Error(
152-
"Failed to fetch release version info from dl.deno.land. Please try again later.",
152+
"Failed to fetch release version info from github.com. Please try again later.",
153153
);
154154
}
155155
let version: string | null = (await res.text()).trim();

0 commit comments

Comments
 (0)