File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import sys
66
77
8- def run ():
8+ def run (args = None ):
99 arguments = ["java" ]
1010
1111 if os .getenv ("JAVA_OPTS" ):
@@ -18,7 +18,18 @@ def run():
1818 )
1919 arguments .append (jar_path )
2020
21- if len ( sys . argv ) > 1 :
22- arguments .extend (sys . argv [ 1 :] )
21+ if args and type ( args ) == list :
22+ arguments .extend (args )
2323
2424 subprocess .call (" " .join (arguments ), shell = True )
25+
26+
27+ def cli ():
28+ args = []
29+ if len (sys .argv ) > 1 :
30+ args = sys .argv [1 :]
31+ run (args )
32+
33+
34+ if __name__ == "__main__" :
35+ cli ()
Original file line number Diff line number Diff line change @@ -74,5 +74,5 @@ def run(self):
7474 "Programming Language :: Python :: Implementation :: PyPy" ,
7575 ],
7676 cmdclass = {"upload" : UploadCommand },
77- entry_points = {"console_scripts" : ["openapi-generator=openapi_generator_cli:run " ]},
77+ entry_points = {"console_scripts" : ["openapi-generator=openapi_generator_cli:cli " ]},
7878)
You can’t perform that action at this time.
0 commit comments