mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-04-07 07:58:48 -04:00
invert to a guard clause
Co-authored-by: Kevin Stillhammer <kevin.stillhammer@gmail.com>
This commit is contained in:
parent
40f8c3a1cf
commit
c897c56b99
1 changed files with 3 additions and 3 deletions
|
@ -9,8 +9,8 @@ export async function getLatestVersion(githubToken: string) {
|
||||||
repo: REPO,
|
repo: REPO,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (latestRelease) {
|
if (!latestRelease) {
|
||||||
return latestRelease.tag_name;
|
|
||||||
}
|
|
||||||
throw new Error("Could not determine latest release.");
|
throw new Error("Could not determine latest release.");
|
||||||
|
}
|
||||||
|
return latestRelease.tag_name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue