fix(cli): exit quietly when output pipes close (#2996)