From 298723c22b0f898ce348d7b2617186f09b0d2534 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 13 Jun 2021 00:55:40 +0200 Subject: [PATCH] gluon-core: gluon-check-site: do not fail when IPKG_INSTROOT is unset --- package/gluon-core/luasrc/lib/gluon/check-site.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/gluon-core/luasrc/lib/gluon/check-site.lua b/package/gluon-core/luasrc/lib/gluon/check-site.lua index 43765f80..6861d8cb 100644 --- a/package/gluon-core/luasrc/lib/gluon/check-site.lua +++ b/package/gluon-core/luasrc/lib/gluon/check-site.lua @@ -360,7 +360,7 @@ end function M.need_domain_name(path) M.need_string(path) M.need(path, function(domain_name) - local f = io.open(os.getenv('IPKG_INSTROOT') .. '/lib/gluon/domains/' .. domain_name .. '.json') + local f = io.open((os.getenv('IPKG_INSTROOT') or '') .. '/lib/gluon/domains/' .. domain_name .. '.json') if not f then return false end f:close() return true @@ -383,7 +383,7 @@ end local check = setfenv(assert(loadfile()), M) -site = assert(json.load(os.getenv('IPKG_INSTROOT') .. '/lib/gluon/site.json')) +site = assert(json.load((os.getenv('IPKG_INSTROOT') or '') .. '/lib/gluon/site.json')) local ok, err = pcall(function() if has_domains then