From 4f5bba79c59db6ddd55a0705e5f3d015a5b10dfb Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 26 Jul 2021 23:48:49 +0800 Subject: fix error tips --- CHANGELOG.md | 8 ++++++++ xmake/core/project/project.lua | 6 +++--- 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 -- cgit v1.3.1