Tried to minimize output, didnt work
This commit is contained in:
7
main.lua
7
main.lua
@@ -3,7 +3,7 @@ local packageStoreageUrl = "/packages"
|
||||
|
||||
|
||||
if args[1] == "list" then
|
||||
local res = http.get("http://localhost:7000/api/repo/list")
|
||||
local res = http.get("http://192.168.178.24:7000/api/repo/list")
|
||||
local ds = res.readAll()
|
||||
print(ds)
|
||||
local json = textutils.unserializeJSON(ds)
|
||||
@@ -57,12 +57,13 @@ if args[1] == "install" then
|
||||
end
|
||||
--------------
|
||||
local rec_msg = full
|
||||
print(rec_msg .. "ds")
|
||||
--print(rec_msg .. "ds")
|
||||
local file = fs.open("output.json", "w")
|
||||
file.write(rec_msg)
|
||||
file.close()
|
||||
local json = textutils.unserializeJSON(rec_msg)
|
||||
print(json)
|
||||
--print(json)
|
||||
local wget = loadfile("/rom/programs/http/wget.lua")
|
||||
if json.statusCode == 404 then
|
||||
print("The Requested package was not found!")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user