1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-14 20:20:30 +00:00

Always add HTTP programs to the path (#1172)

This commit is contained in:
Jonathan Coates 2022-09-30 10:00:07 +01:00 committed by GitHub
parent da5956e943
commit 371f931140
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 8 deletions

View File

@ -13,8 +13,8 @@ if #tArgs < 2 then
end end
if not http then if not http then
printError("Pastebin requires the http API") printError("Pastebin requires the http API, but it is not enabled")
printError("Set http.enabled to true in CC: Tweaked's config") printError("Set http.enabled to true in CC: Tweaked's server config")
return return
end end

View File

@ -21,8 +21,8 @@ end
local url = table.remove(tArgs, 1) local url = table.remove(tArgs, 1)
if not http then if not http then
printError("wget requires the http API") printError("wget requires the http API, but it is not enabled")
printError("Set http.enabled to true in CC: Tweaked's config") printError("Set http.enabled to true in CC: Tweaked's server config")
return return
end end

View File

@ -1,7 +1,7 @@
local completion = require "cc.shell.completion" local completion = require "cc.shell.completion"
-- Setup paths -- Setup paths
local sPath = ".:/rom/programs" local sPath = ".:/rom/programs:/rom/programs/http"
if term.isColor() then if term.isColor() then
sPath = sPath .. ":/rom/programs/advanced" sPath = sPath .. ":/rom/programs/advanced"
end end
@ -19,9 +19,6 @@ end
if commands then if commands then
sPath = sPath .. ":/rom/programs/command" sPath = sPath .. ":/rom/programs/command"
end end
if http then
sPath = sPath .. ":/rom/programs/http"
end
shell.setPath(sPath) shell.setPath(sPath)
help.setPath("/rom/help") help.setPath("/rom/help")