Add validate handler to install selected packages from Welcome wizard
This commit is contained in:
@@ -129,6 +129,19 @@ local page = UI.Page {
|
||||
text = 'More Packages...',
|
||||
event = 'packages',
|
||||
},
|
||||
validate = function(self)
|
||||
local toInstall = { }
|
||||
if self.chkTurtle.value then
|
||||
table.insert(toInstall, 'remoteturtle')
|
||||
end
|
||||
if self.chkInventory.value then
|
||||
table.insert(toInstall, 'inventory-manager')
|
||||
end
|
||||
for _, pkg in ipairs(toInstall) do
|
||||
shell.run('package install ' .. pkg)
|
||||
end
|
||||
return true
|
||||
end,
|
||||
},
|
||||
contributors = UI.WizardPage {
|
||||
index = 5,
|
||||
|
||||
Reference in New Issue
Block a user