mirror of
https://github.com/pesde-pkg/tooling.git
synced 2025-03-03 18:41:45 +00:00
feat(lib): make it possible to override interactivity state externally
Libraries that depend on toolchainlib can now set `_G.interactive` manually and have that option be respected.
This commit is contained in:
parent
c85c895408
commit
13cae3a375
1 changed files with 4 additions and 2 deletions
|
@ -164,7 +164,7 @@ local function getGithubToken(): Option<string>
|
|||
end
|
||||
|
||||
-- Initialize the shared global progress bar state
|
||||
_G.interactive = false
|
||||
_G.interactive = nil
|
||||
local barFns
|
||||
|
||||
function installTool(tool: ToolId, installPath: pathfs.Path): number
|
||||
|
@ -359,7 +359,9 @@ return setmetatable(
|
|||
} :: LibExports,
|
||||
{
|
||||
__call = function(lib: LibExportsImpl, tool: string, pesdeRoot: string?): number
|
||||
_G.interactive = true
|
||||
if _G.interactive == nil then
|
||||
_G.interactive = true
|
||||
end
|
||||
|
||||
local repo, version = string.match(tool, "([^@]+)@?(.*)")
|
||||
if repo == nil or version == nil then
|
||||
|
|
Loading…
Add table
Reference in a new issue