Add validate handler to install selected packages from Welcome wizard

This commit is contained in:
MayaTheShy
2026-03-22 16:15:46 -04:00
parent 04751c3ba9
commit aff772b851

View File

@@ -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,