mqtt-cli icon indicating copy to clipboard operation
mqtt-cli copied to clipboard

Can't pipe to `head`

Open mohd-akram opened this issue 3 years ago • 0 comments

Expected behavior

mqtt sub exits once head exits. The CLI should exit on SIGPIPE.

Actual behavior

mqtt sub keeps running despite SIGPIPE.

To Reproduce

Steps

  1. Run mqtt sub -V 3 -h example.com -t topic | head -n1

Details

  • Affected MQTT CLI version(s):
  • Used JVM version:
4.7.4
Picocli 4.6.2
JVM: 11.0.14.1 (Red Hat, Inc. OpenJDK 64-Bit Server VM 11.0.14.1+1)
OS: Linux 5.16.9-200.fc35.x86_64 amd64

mohd-akram avatar Feb 24 '22 11:02 mohd-akram