aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-03-09 14:15:54 -0500
committerAdam Harrison <adamdharrison@gmail.com>2024-03-09 14:15:54 -0500
commit16950e6de6547e73f03f167ed8c401aeb818aa9a (patch)
treeee7d245de72941d20d3fe73539916916ffa90e3c /src
parent68ca225d2036643454d83caf05a923b678d1f853 (diff)
downloadlite-xl-plugin-manager-16950e6de6547e73f03f167ed8c401aeb818aa9a.tar.gz
lite-xl-plugin-manager-16950e6de6547e73f03f167ed8c401aeb818aa9a.zip
Added in env variable.
Diffstat (limited to 'src')
-rw-r--r--src/lpm.lua18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 35e1de7..064190a 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -2465,14 +2465,16 @@ not commonly used publically.
end
end
- for i,v in ipairs(ARGS["plugin"] or {}) do
- local env = {
- EXECUTABLE_EXTENSION = EXECUTABLE_EXTENSION, SHOULD_COLOR = SHOULD_COLOR, HOME = HOME, USERDIR = USERDIR, CACHEDIR = CACHEDIR, JSON = JSON, TABLE = TABLE, HEADER = HEADER, RAW = RAW, VERBOSE = VERBOSE, FILTRATION = FILTRATION, MOD_VERSION = MOD_VERSION, QUIET = QUIET, FORCE = FORCE, REINSTALL = REINSTALL, CONFIG = CONFIG, NO_COLOR = NO_COLOR, AUTO_PULL_REMOTES = AUTO_PULL_REMOTES, ARCH = ARCH, ASSUME_YES = ASSUME_YES, NO_INSTALL_OPTIONAL = NO_INSTALL_OPTIONAL, TMPDIR = TMPDIR, DATADIR = DATADIR, BINARY = BINARY, POST = POST, PROGRESS = PROGRESS, SYMLINK = SYMLINK, REPOSITORY = REPOSITORY, EPHEMERAL = EPHEMERAL, MASK = MASK,
- Addon = Addon, Repository = Repository, LiteXL = LiteXL, Bottle = Bottle, lpm = lpm, common = common, json = json, log = log,
- settings = settings, repositories = repositories, lite_xls = lite_xls, system_bottle = system_bottle, progress_bar_label = progress_bar_label, write_progress_bar,
- }
- setmetatable(env, { __index = _G })
- load(io.open(v):read("*all"), v, "bt", env)()
+ for i,v in ipairs(common.concat(ARGS["plugin"] or {}, { common.split(",", os.getenv("LPM_PLUGINS") or "") })) do
+ if v ~= "" then
+ local env = {
+ EXECUTABLE_EXTENSION = EXECUTABLE_EXTENSION, SHOULD_COLOR = SHOULD_COLOR, HOME = HOME, USERDIR = USERDIR, CACHEDIR = CACHEDIR, JSON = JSON, TABLE = TABLE, HEADER = HEADER, RAW = RAW, VERBOSE = VERBOSE, FILTRATION = FILTRATION, MOD_VERSION = MOD_VERSION, QUIET = QUIET, FORCE = FORCE, REINSTALL = REINSTALL, CONFIG = CONFIG, NO_COLOR = NO_COLOR, AUTO_PULL_REMOTES = AUTO_PULL_REMOTES, ARCH = ARCH, ASSUME_YES = ASSUME_YES, NO_INSTALL_OPTIONAL = NO_INSTALL_OPTIONAL, TMPDIR = TMPDIR, DATADIR = DATADIR, BINARY = BINARY, POST = POST, PROGRESS = PROGRESS, SYMLINK = SYMLINK, REPOSITORY = REPOSITORY, EPHEMERAL = EPHEMERAL, MASK = MASK,
+ Addon = Addon, Repository = Repository, LiteXL = LiteXL, Bottle = Bottle, lpm = lpm, common = common, json = json, log = log,
+ settings = settings, repositories = repositories, lite_xls = lite_xls, system_bottle = system_bottle, progress_bar_label = progress_bar_label, write_progress_bar,
+ }
+ setmetatable(env, { __index = _G })
+ assert(load(assert(io.open(v, "rb")):read("*all"), v, "bt", env))()
+ end
end
-- Small utility functions that don't play into the larger app; are used for testing