diff options
Diffstat (limited to 'xmake/modules/core/project/depend.lua')
| -rw-r--r-- | xmake/modules/core/project/depend.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/core/project/depend.lua b/xmake/modules/core/project/depend.lua index 4a4f7636b..15189a204 100644 --- a/xmake/modules/core/project/depend.lua +++ b/xmake/modules/core/project/depend.lua @@ -20,7 +20,10 @@ -- load dependent info from the given file (.d) function load(dependfile) - return os.isfile(dependfile) and io.load(dependfile) or nil + if os.isfile(dependfile) then + -- may be the depend file has been incomplete when if the compilation process is abnormally interrupted + return try { function() return io.load(dependfile) end } + end end -- save dependent info to file |
