diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-17 02:20:39 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-17 11:17:18 -0300 |
commit | a075e94ddda2855f7254845971c7b00666292234 (patch) | |
tree | d6d721c7a6a545579417c94e9eaac362af734338 | |
parent | fb437de4f822c7a1135b2c4a6aa964721c0ae500 (diff) | |
download | luarocks-a075e94ddda2855f7254845971c7b00666292234.tar.gz luarocks-a075e94ddda2855f7254845971c7b00666292234.tar.bz2 luarocks-a075e94ddda2855f7254845971c7b00666292234.zip |
fix(build): report if zip is unavailable for --pack-binary-rock
Fixes #1414.
-rw-r--r-- | src/luarocks/pack.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/luarocks/pack.lua b/src/luarocks/pack.lua index 5d70a854..731f49dd 100644 --- a/src/luarocks/pack.lua +++ b/src/luarocks/pack.lua | |||
@@ -124,8 +124,9 @@ function pack.pack_installed_rock(query, tree) | |||
124 | rock_file = rock_file:gsub("%."..cfg.arch:gsub("%-","%%-").."%.", ".all.") | 124 | rock_file = rock_file:gsub("%."..cfg.arch:gsub("%-","%%-").."%.", ".all.") |
125 | end | 125 | end |
126 | fs.delete(rock_file) | 126 | fs.delete(rock_file) |
127 | if not fs.zip(rock_file, unpack(fs.list_dir())) then | 127 | ok, err = fs.zip(rock_file, unpack(fs.list_dir())) |
128 | return nil, "Failed packing "..rock_file | 128 | if not ok then |
129 | return nil, "Failed packing " .. rock_file .. " - " .. err | ||
129 | end | 130 | end |
130 | fs.pop_dir() | 131 | fs.pop_dir() |
131 | fs.delete(temp_dir) | 132 | fs.delete(temp_dir) |