ethersphere / swarm-cli

Manage your Bee node and interact with the Swarm network via the CLI
BSD 3-Clause "New" or "Revised" License
47 stars 21 forks source link

Curl output is cut at the end of line #315

Closed agazso closed 2 years ago

agazso commented 2 years ago

When using the --curl option, the output is cut at the end of line instead of overflowing to the next line. In case of long lines this makes it impossible to copy the curl commands completely.

Example:

% swarm-cli upload dist --curl                                                 
curl "http://localhost:1635/health" -H "accept: application/json, text/plain, */*" -H "user-agent: bee-js/3.1.0"
curl "http://localhost:1635/stamps" -H "accept: application/json, text/plain, */*" -H "user-agent: bee-js/3.1.0"
curl -X POST "http://localhost:1633/bzz" -H "accept: application/json, text/plain, */*" -H "content-type: application/x-tar" -H "swarm-collection: true" -H "swarm-postage-batch-id: ebf81fe8c72747a0b3959
Swarm hash: 69bf3c6a8b9f37606c0171094edcca4ae14f74679d171a193547c39e25d79603
URL: http://localhost:1633/bzz/69bf3c6a8b9f37606c0171094edcca4ae14f74679d171a193547c39e25d79603/
Bzz.link: https://bah5acgzang7ty2ult43wa3aboeeu5xgkjlqu65dhtulrugjvi7bz4joxsybq.bzz.link
curl "http://localhost:1635/stamps/ebf81fe8c72747a0b395994cb64eee00332806a82f343a6a5b7b682050506b8e" -H "accept: application/json, text/plain, */*" -H "user-agent: bee-js/3.1.0"
Stamp ID: ebf81fe8c72747a0b395994cb64eee00332806a82f343a6a5b7b682050506b8e
Usage: 1%
TTL: unknown

In the third line of the output the command is cut after ebf81fe8c72747a0b3959 while the stamp id is longer and continues. In the case when the bee-api-url is longer then even a smaller part of the command is visible.

agazso commented 2 years ago

It seems that this is not an error with swarm-cli but something else breaks my terminal and that causes truncated lines.