-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
nil messages are not translated #1267
Labels
defect
Suspected defect such as a bug or regression
Comments
hmm, not sure we can safely assume all translators will handle nil inputs? |
Right now error exit codes are reported when using
output of the sub:
This seems to me like reasonable behavior when running |
OK, we'll fix that |
ploubser
added a commit
to ploubser/natscli
that referenced
this issue
Feb 13, 2025
ploubser
added a commit
to ploubser/natscli
that referenced
this issue
Feb 13, 2025
ploubser
added a commit
to ploubser/natscli
that referenced
this issue
Feb 13, 2025
ripienaar
added a commit
that referenced
this issue
Feb 13, 2025
(#1267) Don't print empty message string when --translate is passed
@Zambito1 we took a stab at this, do you want to see how main works for you now? |
@ripienaar main works for me now, thanks! |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Observed behavior
If you run
nats sub
with--translate
and receive an empty message, the empty message is not piped to--translate
. For example:And then
will yield
Expected behavior
nats sub
with--translate='wc -c'
should yield0
when receiving an empty message.Server and client version
cli:
v0.1.2-0.20250122082047-856d2dcf4340
server:
2.10.22
Host environment
Client host: GNU Guix
Steps to reproduce
nats sub foo --translace='wc -c'
nats pub foo ''
nil body
rather than0
The text was updated successfully, but these errors were encountered: