diff options
| author | ruki <[email protected]> | 2021-08-01 11:02:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-08-01 11:02:25 +0800 |
| commit | cdf6f04361f0ff08562e62f22b3fec8367cfde2a (patch) | |
| tree | 4638400787e2baca21aa68c7ed00d0745c64565a /xmake/core/project/option.lua | |
| parent | 9a18e7e60531afdae14c7ed7fe846e850e1cb207 (diff) | |
improve to check option tips
Diffstat (limited to 'xmake/core/project/option.lua')
| -rw-r--r-- | xmake/core/project/option.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index a92f8922f..93d25990f 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -175,7 +175,14 @@ function _instance:_check() end -- trace - utils.cprint("checking for %s ... %s", name, self:enabled() and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") + local result + if self:enabled() then + local value = self:value() + result = "${color.success}" .. (type(value) == "boolean" and "${text.success}" or tostring(value)) + else + result = "${color.nothing}${text.nothing}" + end + utils.cprint("checking for %s ... %s", name, result) if not ok then os.raise(errors) end |
