Skip to content

Commit c5e5498

Browse files
authored
normalize secret values when processing call function data
1 parent 4f3040c commit c5e5498

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

DevTool.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -765,16 +765,17 @@ function DevTool:ProcessCallFunctionData(ok, info, parent, args, results)
765765
-- for example 1, 2, nil, 4 should return only this 4 values nothing more, nothing less.
766766
local found = false
767767
for i = 10, 1, -1 do
768-
if results[i] ~= nil then
768+
local result = DevTool.normalizeSecretValue(results[i])
769+
if result ~= nil then
769770
found = true
770771
end
771772

772773
if found or i == 1 then
773774
-- if found some return or if return is nil
774-
table.insert(elements, self:NewElement(results[i], string.format(" return: %d", i), indentation))
775+
table.insert(elements, self:NewElement(result, string.format(" return: %d", i), indentation))
775776

776-
returnFormattedStr = string.format(" %s (%s)%s", tostring(results[i]),
777-
self.colors.lightblue:WrapTextInColorCode(type(results[i])), returnFormattedStr)
777+
returnFormattedStr = string.format(" %s (%s)%s", tostring(result),
778+
self.colors.lightblue:WrapTextInColorCode(type(result)), returnFormattedStr)
778779
end
779780
end
780781

0 commit comments

Comments
 (0)