pp does not read standard input at all, and the cloud command sees
an empty one. To send input to a command, ask for it with --stdin, the way
you would with docker run -i.
Forwarding standard input
lean --stdin, where the command line itself says the
input is on stdin. It is forwarded without the flag:
Limits
ppreads standard input to the end before the command starts, so input is not interactive.- Up to 64 MiB is accepted.
Why forwarding is opt-in
A cloud command cannot simply inherit your stdin the way a local process does.pp would have to read it on the command’s behalf, and doing that uninvited
breaks two ordinary situations:
- Scripts and tools that leave stdin open. CI runners, agent harnesses and
subprocess.Popen(stdin=PIPE)hand a command a pipe that never closes. Waiting for it would hang forever, for a command (lake env lean File.lean) that never wanted input. - Loops. In
while read f; do pp lake env lean "$f"; done < files.txt, reading stdin would swallow the rest offiles.txtand end the loop after one iteration. This is the classicsshpitfall.
pp never reads stdin unless asked, it is safe to call from both. See
Scripts and agents for patterns that rely on this.