fix: (regression beta) command "update" not working with online updates

Massimo Melina committed Feb 15, 2025 at 12:36 UTC 9f2d0eb9d143d893da860d7c3e595751f89ef8db
1 file changed +1 -1
src/update.ts
+1 -1
@@ -109,7 +109,7 @@ export async function update(tagOrUrl: string='') {
109 let url = tagOrUrl.includes('://') && tagOrUrl
110 if (tagOrUrl === PREVIOUS_TAG)
111 await rename(PREVIOUS_FN, LOCAL_UPDATE)
112 - else if (tagOrUrl && !url) {
112 + else if (tagOrUrl ? !url : !await localUpdateAvailable()) {
113 if (/^\d/.test(tagOrUrl)) // work even if the tag is passed without the initial 'v' (useful for console commands)
114 tagOrUrl = 'v' + tagOrUrl
115 const update = !tagOrUrl ? (await getUpdates(true))[0]