Skip to content

Commit

Permalink
feat(cli): Allow multiple runtime SILE_PATH segments (backport from d…
Browse files Browse the repository at this point in the history
…evelop branch)
  • Loading branch information
alerque committed Oct 23, 2023
1 parent 0fb9ade commit e7c8fe2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sile.in
Expand Up @@ -6,7 +6,11 @@ SHARED_LIB_EXT = "@SHARED_LIB_EXT@"

-- At this point at run time we may or may not have anything useful in package.path,
-- so require() isn't something we can rely on.
local status = pcall(dofile, "@SILE_PATH@/core/pathsetup.lua")
local status
for path in string.gmatch("@SILE_PATH@", "[^;]+") do
status = pcall(dofile, path .. "/core/pathsetup.lua")
if status then break end
end
if not status then
dofile("./core/pathsetup.lua")
end
Expand Down

0 comments on commit e7c8fe2

Please sign in to comment.