summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2025-10-26 17:00:54 +0100
committerArthur LAURENT <[email protected]>2025-10-26 17:23:43 +0100
commita4085b28cf8d0a830fd6315e757ebcc5763cbeda (patch)
treef29d076cda814f6fbee2a6d12863d6a30417bf19
parent56583f742da88091b9916fa91034f83e2aa67438 (diff)
nfc(swift) use tryrm instead of isfile + rm
-rw-r--r--xmake/rules/swift/xmake.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/xmake/rules/swift/xmake.lua b/xmake/rules/swift/xmake.lua
index 9f9f6bd19..c012ba3cb 100644
--- a/xmake/rules/swift/xmake.lua
+++ b/xmake/rules/swift/xmake.lua
@@ -169,9 +169,7 @@ rule("swift.interop", function()
print(os.args(table.join(sc, flags)))
end
- if os.isfile(header) then
- os.rm(header)
- end
+ os.tryrm(header)
local outdata, errdata = os.iorunv(sc, flags)
assert(outdata, errdata)
end, {