streamr-dev/cli-tools

Crashes on echo example

Closed this issue · 1 comments

harbu commented

Crashes on

echo '{"message": "test"}' | publish-to-stream-dev c4iXIHoVSHGadSDBvsLWsw tester1-api-key

because it interprets echo's last new line as unparseable JSON.

Needs something of the likes of

if (!data.trim()) {
  return done()
}

Found by @timoxley

harbu commented

Works now.