diff options
| author | Stefan Boberg <[email protected]> | 2023-05-19 14:48:57 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2023-05-19 14:48:57 +0200 |
| commit | ad9fd6283c4f6a2af99c8ee3caf141ded15a53d8 (patch) | |
| tree | bad64ee618feb1a012a1b724109d8e41158954e6 /scripts/bundle.lua | |
| parent | updated CHANGELOG.md to reflect oplog bugfix (diff) | |
| download | zen-ad9fd6283c4f6a2af99c8ee3caf141ded15a53d8.tar.xz zen-ad9fd6283c4f6a2af99c8ee3caf141ded15a53d8.zip | |
updated logic for 7z/zip
previously, an attempt was made to locate any installed binary but the
located path was not actually used in practice
Diffstat (limited to 'scripts/bundle.lua')
| -rw-r--r-- | scripts/bundle.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/bundle.lua b/scripts/bundle.lua index 0d6ce04ad..30ce9554b 100644 --- a/scripts/bundle.lua +++ b/scripts/bundle.lua @@ -73,8 +73,8 @@ local function _zip(store_only, zip_path, ...) end import("detect.tools.find_7z") - local cmd = find_7z() - if cmd then + local cmd_7z = find_7z() + if cmd_7z then input_paths = {} if source_dir then -- Suffixing a directory path with a "/." will have 7z set the path @@ -97,7 +97,7 @@ local function _zip(store_only, zip_path, ...) compression_level = "-mx0" end - local ret = _exec("7z", "a", compression_level, zip_path, table.unpack(input_paths)) + local ret = _exec(cmd_7z, "a", compression_level, zip_path, table.unpack(input_paths)) if ret > 0 then raise("Received error from 7z") end @@ -106,8 +106,8 @@ local function _zip(store_only, zip_path, ...) print("7z not found") import("detect.tools.find_zip") - cmd = find_zip() - if cmd then + zip_cmd = find_zip() + if zip_cmd then local input_paths = inputs local cwd = os.curdir() if source_dir then @@ -125,7 +125,7 @@ local function _zip(store_only, zip_path, ...) strip_leading_path = "--junk-paths" end - local ret = _exec("zip", "-r", compression_level, strip_leading_path, zip_path, table.unpack(input_paths)) + local ret = _exec(zip_cmd, "-r", compression_level, strip_leading_path, zip_path, table.unpack(input_paths)) if ret > 0 then raise("Received error from zip") end |