diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2024-11-29 08:09:07 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2024-11-29 08:09:07 -0500 |
commit | 983b04f089ca0ed41148f3f99482ce4f6052d344 (patch) | |
tree | 6f0e09d5599fa125a5407ec8faad5d37bc64508c | |
parent | cde491bc2071bc3f837b0ff78b1074ca5e46c3e5 (diff) | |
download | lite-xl-plugin-manager-983b04f089ca0ed41148f3f99482ce4f6052d344.tar.gz lite-xl-plugin-manager-983b04f089ca0ed41148f3f99482ce4f6052d344.zip |
Changed version number validation on mod-version, and allowed for --ssl-certs=system to override environment variables.
-rw-r--r-- | src/lpm.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index 9fab82b..2e0b7fb 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -2641,7 +2641,7 @@ not commonly used publically. ARCH = ARGS["arch"] or { DEFAULT_ARCH } ASSUME_YES = ARGS["assume-yes"] or FORCE MOD_VERSION = ARGS["mod-version"] or os.getenv("LPM_MODVERSION") - assert(not MOD_VERSION or MOD_VERSION == "any" or MOD_VERSION:find("^%d+$"), "--mod-version must be either 'any' or a number.") + assert(not MOD_VERSION or MOD_VERSION == "any" or MOD_VERSION:find("^%d+%.?%d*%.?%d*$"), "--mod-version must be either 'any' or a version number.") HOME = (os.getenv("USERPROFILE") or os.getenv("HOME")):gsub(PATHSEP .. "$", "") USERDIR = common.normalize_path(ARGS["userdir"]) or os.getenv("LITE_USERDIR") or (os.getenv("XDG_CONFIG_HOME") and os.getenv("XDG_CONFIG_HOME") .. PATHSEP .. "lite-xl") or (HOME and (HOME .. PATHSEP .. '.config' .. PATHSEP .. 'lite-xl')) @@ -2712,7 +2712,7 @@ not commonly used publically. if ARGS[2] == "purge" then return lpm.purge() end local ssl_certs = ARGS["ssl-certs"] or os.getenv("SSL_CERT_DIR") or os.getenv("SSL_CERT_FILE") if not NO_NETWORK then - if ssl_certs then + if ssl_certs and ssl_certs ~= "system" then if ssl_certs == "noverify" then system.certs("noverify") else |