mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 08:20:05 -04:00
ci: make io_print accept nil as input argument (#2445)
Convert nil to an empty string, which mimicks the behavior of standard print
This commit is contained in:
parent
aefabaa1d4
commit
f42b8a9d10
1 changed files with 3 additions and 0 deletions
|
|
@ -3,6 +3,9 @@
|
||||||
-- Equivalent to print(), but this will ensure consistent output regardless of
|
-- Equivalent to print(), but this will ensure consistent output regardless of
|
||||||
-- operating system.
|
-- operating system.
|
||||||
local function io_print(text)
|
local function io_print(text)
|
||||||
|
if not text then
|
||||||
|
text = ""
|
||||||
|
end
|
||||||
io.write(text, "\n")
|
io.write(text, "\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue