squish.lua: Exit if any modules don't have a path

Thu, 31 Dec 2015 20:28:50 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 31 Dec 2015 20:28:50 +0000
changeset 90
b9470a7655b4
parent 89
23dbca856f92
child 91
4608c7c025e5

squish.lua: Exit if any modules don't have a path

squish.lua file | annotate | diff | comparison | revisions
--- a/squish.lua	Thu Dec 31 20:08:01 2015 +0000
+++ b/squish.lua	Thu Dec 31 20:28:50 2015 +0000
@@ -196,6 +196,13 @@
 	end
 end
 
+for _, module in ipairs(modules) do
+	if not module.path then
+		print_err("Exiting due to missing modules without a path");
+		os.exit(1);
+	end
+end
+
 if opts.list_files then
 	local function write(text)
 		io.write(text, "\n");

mercurial