diff options
| author | ruki <[email protected]> | 2020-03-19 23:42:56 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-19 16:17:37 +0800 |
| commit | 88c4065ee854de1667e4c300960582052868c903 (patch) | |
| tree | 370d08ef5f5c1c7e3c173e50ea86e03ebca32590 | |
| parent | 873f5c6486e24ce9809f7251ea3507699af6855c (diff) | |
improve require info
| -rw-r--r-- | xmake/actions/require/info.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/actions/require/info.lua b/xmake/actions/require/info.lua index b9411c109..c6b3f6995 100644 --- a/xmake/actions/require/info.lua +++ b/xmake/actions/require/info.lua @@ -40,7 +40,9 @@ function _from(instance) return "" end elseif #instance:urls() > 0 then - return instance:supported() and format(", ${yellow}remote${clear}(in %s)", instance:repo():name()) or format(", ${yellow}remote${clear}(${red}unsupported${clear} in %s)", instance:repo():name()) + local repo = instance:repo() + local reponame = repo and repo:name() or "unknown" + return instance:supported() and format(", ${yellow}remote${clear}(in %s)", reponame) or format(", ${yellow}remote${clear}(${red}unsupported${clear} in %s)", reponame) elseif instance:isSys() then return ", ${red}missing${clear}" else |
