Dax Raad 7 месяцев назад
Родитель
Сommit
c2208fa1f9
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      packages/opencode/script/publish.ts

+ 4 - 1
packages/opencode/script/publish.ts

@@ -90,7 +90,10 @@ if (!snapshot) {
   }
 
   const previous = await fetch("https://api.github.com/repos/sst/opencode/releases/latest")
-    .then((res) => res.json())
+    .then((res) => {
+      if (!res.ok) throw new Error(res.statusText)
+      return res.json()
+    })
     .then((data) => data.tag_name)
 
   console.log("finding commits between", previous, "and", "HEAD")