Skip to content

Commit a383371

Browse files
committed
Fix prior behavior
1 parent 6df80a5 commit a383371

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

openapi_generator_cli/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ def run(args: list[str] | None = None) -> subprocess.CompletedProcess[bytes]:
5858

5959
def cli(argv: list[str] | None = None) -> None:
6060
"""Run the OpenAPI Generator CLI with the arguments provided on the command line."""
61-
args = argv[1:] if argv is not None and len(argv) > 1 else []
61+
argv = argv or sys.argv
62+
args = []
63+
if len(argv) > 1:
64+
args = argv[1:]
6265
sys.exit(run(args).returncode)
6366

6467

0 commit comments

Comments
 (0)