Fix --raw to output raw content to stdout
--raw without -o now streams raw content to stdout instead of showing metadata Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -870,8 +870,8 @@ def view(cid, output, raw):
|
|||||||
url = f"{get_server()}/cache/{cid}"
|
url = f"{get_server()}/cache/{cid}"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if output == "-":
|
if output == "-" or (raw and not output):
|
||||||
# Stream to stdout for piping
|
# Stream to stdout for piping (--raw without -o also goes to stdout)
|
||||||
resp = requests.get(url, stream=True)
|
resp = requests.get(url, stream=True)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
for chunk in resp.iter_content(chunk_size=8192):
|
for chunk in resp.iter_content(chunk_size=8192):
|
||||||
|
|||||||
Reference in New Issue
Block a user