scope issue

This commit is contained in:
jane 2021-06-06 00:42:30 -04:00
parent 3a6e75776d
commit e026e44e52
2 changed files with 10 additions and 4 deletions

View file

@ -11,16 +11,19 @@ if not fs.exists(temp) then
fs.makeDir(temp)
end
local programToInstall = nil
if #args > 0 then
local programToInstall = args[1]
programToInstall = args[1]
else
print("usage:")
print("install.lua <project>")
print("install.lua <project> <custom install path>")
end
local customPath = nil
if #args > 1 then
print("WARNING: custom paths are currently not supported.")
local customPath = shell.resolve(args[2])
customPath = shell.resolve(args[2])
end
local function downloadFile(program, filename)

View file

@ -11,12 +11,15 @@ if not fs.exists(temp) then
fs.makeDir(temp)
end
local programToInstall = nil
if #args > 0 then
local programToInstall = args[1]
programToInstall = args[1]
end
local customPath = nil
if #args > 1 then
print("WARNING: custom paths are currently not supported.")
local customPath = shell.resolve(args[2])
customPath = shell.resolve(args[2])
end
local function downloadFile(program, filename)