Skip to content

Commit 9e410ad

Browse files
committed
Fix: fixed pipe data
1 parent 318c15f commit 9e410ad

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/python/app/command/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def map_input(input_source: str) -> BinaryIO:
88
"""Maps input source to stdin or to the file path"""
99

1010
if input_source is None:
11-
return stdin.buffer
11+
return BytesIO(stdin.buffer.read())
1212

1313
with open(input_source, mode='rb', buffering=16384) as file:
1414
return BytesIO(file.read())

src/python/app/command/parser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ def get_parser() -> ArgumentParser:
1414

1515
parser = ArgumentParser(prog='PROG',
1616
description='Image CLI that performs different image operations like scaling, rotating etc')
17-
parser.add_argument('input',
17+
parser.add_argument('--input', '-i',
1818
nargs='?',
1919
default=None,
20+
dest='input',
2021
help='program input')
21-
parser.add_argument('output',
22+
parser.add_argument('--output', '-o',
2223
nargs='?',
2324
default=None,
25+
dest='output',
2426
help='program output')
2527
parser.add_argument('--output-format',
2628
nargs='?',

0 commit comments

Comments
 (0)