Skip to content

Commit 1a758e5

Browse files
committed
show: don't print nil targetfile
1 parent d4da094 commit 1a758e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

xmake/plugins/show/info/target.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ function _show_target(target)
136136
print("The information of target(%s):", target:name())
137137
cprint(" ${color.dump.string}at${clear}: %s", path.join(target:scriptdir(), "xmake.lua"))
138138
cprint(" ${color.dump.string}kind${clear}: %s", target:kind())
139-
cprint(" ${color.dump.string}targetfile${clear}: %s", target:targetfile())
139+
local targetfile = target:targetfile()
140+
if targetfile then
141+
cprint(" ${color.dump.string}targetfile${clear}: %s", targetfile)
142+
end
140143
local deps = target:get("deps")
141144
if deps then
142145
cprint(" ${color.dump.string}deps${clear}:")

0 commit comments

Comments
 (0)