Skip to content

Commit 5d682d1

Browse files
committed
Update install.lua
Small release download fix
1 parent 6b5bbfb commit 5d682d1

File tree

1 file changed

+2
-27
lines changed

1 file changed

+2
-27
lines changed

docs/install.lua

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -130,36 +130,11 @@ function installer.download(url, file)
130130
end
131131
end
132132

133-
local basaltDataCache
134-
function installer.getBasaltData()
135-
if(basaltDataCache~=nil)then return basaltDataCache end
136-
local content
137-
printStatus("Downloading basalt data...")
138-
if(fs.exists("basaltdata.json"))then
139-
content = fs.open("basaltdata.json", "r")
140-
else
141-
content = installer.get("https://basalt.madefor.cc/basaltdata.json")
142-
end
143-
if(content~=nil)then
144-
content = content.readAll()
145-
basaltDataCache = textutils.unserializeJSON(content)
146-
printStatus("Successfully downloaded basalt data!")
147-
return basaltDataCache
148-
end
149-
end
150-
151133
function installer.getRelease(version)
152-
--local v = installer.getBasaltData().versions[version]
153-
--if(v~=nil)then
154-
printStatus("Downloading basalt "..version)
155-
local content = http.get("https://basalt.madefor.cc/versions/"..version, {Authorization = _G._GIT_API_KEY and "token ".._G._GIT_API_KEY})
156-
if(content~=nil)then
157-
return content.readAll()
158-
end
159-
--end
134+
return installer.get("https://raw.githubusercontent.com/Pyroxenium/Basalt/master/docs/versions/"..version)
160135
end
161136

162-
function installer.downloadRelease(file, version)
137+
function installer.downloadRelease(version, file)
163138
local content = installer.getRelease(version)
164139
if(content~=nil)then
165140
local f = fs.open(file or "basalt.lua", "w")

0 commit comments

Comments
 (0)