Skip to content

Commit 4dcbd8d

Browse files
committed
Fixing large output.
1 parent 500dc2b commit 4dcbd8d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

kustdiff

+6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ function main {
3434
set -e
3535
output=$(printf "\`\`\` diff\n%s\n\`\`\`\n" "$diff")
3636
escaped_output=${output//$'\n'/'%0A'}
37+
38+
# If escaped output is longer than 65000 characters return "output to large to print as a github comment"
39+
if [ ${#escaped_output} -gt 65000 ]; then
40+
escaped_output="Output is greater than 65000 characters, and therefore too large to print as a github comment."
41+
fi
42+
3743
echo "::set-output name=diff::$escaped_output"
3844
printf "\n\nOutput: %s\n" "$escaped_output"
3945
}

0 commit comments

Comments
 (0)