diff options
| author | ShifftC <[email protected]> | 2025-09-16 17:36:41 +0200 |
|---|---|---|
| committer | ShifftC <[email protected]> | 2025-09-16 18:16:49 +0200 |
| commit | 1a758e59eeec08e6bd04d8c2c94e98f8ad00dba4 (patch) | |
| tree | 57e67ecff3b308918eabadf82045e633bcddbb11 | |
| parent | d4da0944ead398d2e7eba985928adeba197557b7 (diff) | |
show: don't print nil targetfile
| -rw-r--r-- | xmake/plugins/show/info/target.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/plugins/show/info/target.lua b/xmake/plugins/show/info/target.lua index 7c9143a92..93648e716 100644 --- a/xmake/plugins/show/info/target.lua +++ b/xmake/plugins/show/info/target.lua @@ -136,7 +136,10 @@ function _show_target(target) print("The information of target(%s):", target:name()) cprint(" ${color.dump.string}at${clear}: %s", path.join(target:scriptdir(), "xmake.lua")) cprint(" ${color.dump.string}kind${clear}: %s", target:kind()) - cprint(" ${color.dump.string}targetfile${clear}: %s", target:targetfile()) + local targetfile = target:targetfile() + if targetfile then + cprint(" ${color.dump.string}targetfile${clear}: %s", targetfile) + end local deps = target:get("deps") if deps then cprint(" ${color.dump.string}deps${clear}:") |
