From 4e1376fa8840f0055dab5c0e7dbcd8cc1c281b6d Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 19 Feb 2024 13:51:09 -0300 Subject: fix(lint): don't crash when missing description --- spec/lint_spec.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'spec') diff --git a/spec/lint_spec.lua b/spec/lint_spec.lua index b205cc57..847c9800 100644 --- a/spec/lint_spec.lua +++ b/spec/lint_spec.lua @@ -93,5 +93,19 @@ describe("luarocks lint #integration", function() ]], finally) assert.is_false(run.luarocks_bool("lint no_build_table-1.0-1.rockspec")) end) + + it("no description field", function() + write_file("nodesc-1.0-1.rockspec", [[ + package = "nodesc" + version = "0.1-1" + source = { + url = "http://example.com/foo/tar.gz" + } + dependencies = { + "lua >= 5.1" + } + ]], finally) + assert.is_false(run.luarocks_bool("lint nodesc-1.0-1.rockspec")) + end) end) end) -- cgit v1.2.3-55-g6feb