summaryrefslogtreecommitdiff
path: root/xmake/modules/core/project/depend.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-04 00:52:06 +0800
committerruki <[email protected]>2019-06-03 23:12:41 +0800
commit138edbbd1ccca0e002775cced48a14733c98e484 (patch)
tree4c807f10db0bb209f2ea1e4e98f2692b09a0b7c4 /xmake/modules/core/project/depend.lua
parentb464eb657ec7b4c24d3c7593294c6bf15f1f6338 (diff)
improve to load dep file
Diffstat (limited to 'xmake/modules/core/project/depend.lua')
-rw-r--r--xmake/modules/core/project/depend.lua5
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