mirror of
https://github.com/ilyakooo0/haskell-nova.git
synced 2024-10-05 20:19:13 +03:00
Check the HLS exists
This commit is contained in:
parent
358fc94194
commit
78824150c2
@ -45,6 +45,9 @@ async function downloadTool(name) {
|
||||
const storagePath = getStorageForTool(name);
|
||||
console.log("Downloading " + storagePath);
|
||||
const urls = await getHLSAssets();
|
||||
if (!(name in urls)) {
|
||||
sendPermanentNotification("There is no pre-built HLS for GHC " + name ,"There is no pre-built version of HLS for GHC " + name + ". You can either build HLS yourself or update your project to one of the pre-built versions: https://github.com/haskell/haskell-language-server/releases")
|
||||
}
|
||||
const response = await fetch(urls[name]);
|
||||
if (!response.ok) {
|
||||
console.error(response.statusText);
|
||||
@ -194,4 +197,3 @@ function which(name) {
|
||||
shell: true,
|
||||
}).then((p) => p.trim())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user