bliss

KISS in Lua
git clone git://bvnf.space/bliss.git
Log | Files | Refs | README | LICENSE

commit a74ad09b9e63e3243bb8888f2e63ea75eea2c82b
parent 1cdf97d221422f96fa3ba23bfba994b65074a01e
Author: phoebos <ben@bvnf.space>
Date:   Tue, 27 Jun 2023 17:54:20 +0100

restrict env.COMPRESS to permitted values

Diffstat:
Mbliss/utils.lua | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/bliss/utils.lua b/bliss/utils.lua @@ -31,6 +31,12 @@ function setup() TMPDIR = os.getenv("KISS_TMPDIR"), time = os.date("%Y-%m-%d-%H:%M"), } + + local permitted_compress = {bz2 = true, gz = true, lzma = true, lz = true, xz = true, zst = true} + if not permitted_compress[env.COMPRESS] then + die("KISS_COMPRESS='"..env.COMPRESS.."' is not permitted (bz2, gz, lzma, lz, xz, zst)") + end + -- sys_db depends on ROOT so must be set after env is constructed env.pkg_db = "var/db/kiss/installed" env.cho_db = "var/db/kiss/choices"