UnrealHeaderTool failing only on Jenkins

The build is vanilla UE 4.20.

I created a shell script that I can invoke from Jenkins to build the editor. It works if I invoke it directly, but fails if I invoke it from Jenkins.

I’ve attached the logs, hiding the project name (sorry).link text