summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-07-26 23:48:49 +0800
committerruki <[email protected]>2021-07-26 23:48:49 +0800
commit4f5bba79c59db6ddd55a0705e5f3d015a5b10dfb (patch)
treef045037650a3956dddaf012436d842175f4968f7
parentc1f88219e813ab1f7cc1bc9615bf81c7bbfe7d89 (diff)
fix error tips
-rw-r--r--CHANGELOG.md8
-rw-r--r--xmake/core/project/project.lua6
2 files changed, 11 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f010ace24..eae395911 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
## master (unreleased)
+### Bugs fixed
+
+* [#1531](https://github.com/xmake-io/xmake/issues/1531): Fix error info when loading targets failed
+
## v2.5.6
### New features
@@ -1040,6 +1044,10 @@
## master (开发中)
+### Bugs 修复
+
+* [#1531](https://github.com/xmake-io/xmake/issues/1531): 修复 targets 加载失败的错误信息提示错误
+
## v2.5.6
### 新特性
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index 114b1557d..3ff962d7c 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -379,13 +379,13 @@ function project._load_targets()
local requires = project.required_packages()
local ok, errors = project._load(true)
if not ok then
- return nil, errors
+ return nil, nil, errors
end
-- load targets
local results, errors = project._load_scope("target", true, true)
if not results then
- return nil, errors
+ return nil, nil, errors
end
-- make targets
@@ -446,7 +446,7 @@ function project._load_targets()
table.insert(t._ORDERULES, r)
end
else
- return nil, string.format("unknown rule(%s) in target(%s)!", rulename, t:name())
+ return nil, nil, string.format("unknown rule(%s) in target(%s)!", rulename, t:name())
end
end
end