diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2016-08-02 23:19:43 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2016-08-02 23:19:43 (GMT) |
commit | 1a59d510a646ff81b3e72d2d745d2f50ee8264c6 (patch) | |
tree | 8d86d85fd3610b8fe473d95a038f8a9713c478e2 /tools | |
parent | 963a2eaf9468661d7840c999dd958bdec13617e1 (diff) | |
download | mxe-1a59d510a646ff81b3e72d2d745d2f50ee8264c6.zip mxe-1a59d510a646ff81b3e72d2d745d2f50ee8264c6.tar.gz mxe-1a59d510a646ff81b3e72d2d745d2f50ee8264c6.tar.bz2 |
build-pkg: fix crash if package breaks in 1st pass
fix https://github.com/mxe/mxe/issues/1471
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/build-pkg.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index c640404..a2e1242 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -644,10 +644,13 @@ local function comparePasses(item, new_files, prev_file2item, prev_files) end files_set[file] = true end - for _, file in ipairs(prev_files) do - if not files_set[file] then - log('Item %s installs a file on first pass only: %s', - item, file) + if prev_files then + -- prev_files is nil, if the first pass failed + for _, file in ipairs(prev_files) do + if not files_set[file] then + log('Item %s installs a file on first pass only: %s', + item, file) + end end end -- TODO compare contents of files (nm for binaries) |