From 0f9d259ab3a59ae0f3ab3a2992dd371a368da5aa Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 9 Mar 2015 14:35:14 -0300 Subject: Test success of patching in `unpack`. Closes #316. Includes test cases for the test suite! Yay! --- src/luarocks/unpack.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/luarocks/unpack.lua b/src/luarocks/unpack.lua index 9204e265..a889bac5 100644 --- a/src/luarocks/unpack.lua +++ b/src/luarocks/unpack.lua @@ -43,9 +43,10 @@ local function unpack_rockspec(rockspec_file, dir_name) end ok, err = fs.change_dir(sources_dir) if not ok then return nil, err end - build.apply_patches(rockspec) + ok, err = build.apply_patches(rockspec) fs.pop_dir() fs.pop_dir() + if not ok then return nil, err end return rockspec end @@ -79,8 +80,9 @@ local function unpack_rock(rock_file, dir_name, kind) end ok, err = fs.change_dir(rockspec.source.dir) if not ok then return nil, err end - build.apply_patches(rockspec) + ok, err = build.apply_patches(rockspec) fs.pop_dir() + if not ok then return nil, err end end end return rockspec -- cgit v1.2.3-55-g6feb