Bizarre failure of shell script 'diff'

I just ran a simplified test on Catalina using this action:

And that ran as expected, delivering the output to a window. I tried a few other commands (cd /tmp and ls on that) and there were no surprises. I looked at the Gear options in the action and didn't find any clue that would explain your results.

Sorry all I can offer is a contradictory data point.