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,16 @@ 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+ def cli ():
27+ args = []
28+ if len (sys .argv ) > 1 :
29+ args = sys .argv [1 :]
30+ run (args )
31+
32+ if __name__ == "__main__" :
33+ 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