From 7a2dd65869977c9f7f87ec2587faa7acc96fed2b Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 20 Jun 2018 14:23:23 -0300 Subject: fs: nicer error message when cfg is not initialized --- src/luarocks/fs.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/luarocks/fs.lua b/src/luarocks/fs.lua index 999572b8..911ac474 100644 --- a/src/luarocks/fs.lua +++ b/src/luarocks/fs.lua @@ -61,6 +61,10 @@ do return end + if not cfg.each_platform then + error("cfg is not initalized, please run cfg.init() first") + end + -- Load platform-specific functions local loaded_platform = nil for platform in cfg.each_platform() do -- cgit v1.2.3-55-g6feb