aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-09 14:35:14 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-09 14:35:14 -0300
commit0f9d259ab3a59ae0f3ab3a2992dd371a368da5aa (patch)
treea251978814d083d3ef55ede0787020c3735ce042 /src
parent9a9caf8fd6edfb82284b7ec6edb2f460400b614c (diff)
downloadluarocks-0f9d259ab3a59ae0f3ab3a2992dd371a368da5aa.tar.gz
luarocks-0f9d259ab3a59ae0f3ab3a2992dd371a368da5aa.tar.bz2
luarocks-0f9d259ab3a59ae0f3ab3a2992dd371a368da5aa.zip
Test success of patching in `unpack`. Closes #316.
Includes test cases for the test suite! Yay!
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/unpack.lua6
1 files changed, 4 insertions, 2 deletions
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)
43 end 43 end
44 ok, err = fs.change_dir(sources_dir) 44 ok, err = fs.change_dir(sources_dir)
45 if not ok then return nil, err end 45 if not ok then return nil, err end
46 build.apply_patches(rockspec) 46 ok, err = build.apply_patches(rockspec)
47 fs.pop_dir() 47 fs.pop_dir()
48 fs.pop_dir() 48 fs.pop_dir()
49 if not ok then return nil, err end
49 return rockspec 50 return rockspec
50end 51end
51 52
@@ -79,8 +80,9 @@ local function unpack_rock(rock_file, dir_name, kind)
79 end 80 end
80 ok, err = fs.change_dir(rockspec.source.dir) 81 ok, err = fs.change_dir(rockspec.source.dir)
81 if not ok then return nil, err end 82 if not ok then return nil, err end
82 build.apply_patches(rockspec) 83 ok, err = build.apply_patches(rockspec)
83 fs.pop_dir() 84 fs.pop_dir()
85 if not ok then return nil, err end
84 end 86 end
85 end 87 end
86 return rockspec 88 return rockspec