File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,6 +189,10 @@ def parse_options():
189189 help = "When this argument is used files will be analysed one by one. "
190190 "Using --serial takes priority over --ncpus" ,
191191 )
192+ parser .add_argument (
193+ "--zpipe" ,
194+ help = "Use this specific .zpipe file" ,
195+ )
192196 parser .add_argument (
193197 "converted_entities" ,
194198 nargs = "+" ,
@@ -214,7 +218,13 @@ def main():
214218 sys .exit ("No files to analyse" )
215219
216220 lang = analysable_paths [0 ].lang
217- analyser_path = find_analyser_zpipe (lang )
221+ if args .zpipe is not None :
222+ analyser_path = args .zpipe
223+ if not Path (analyser_path ).exists ():
224+ sys .exit (f"Given --zpipe path ({ analyser_path } ) does not exist" )
225+ else :
226+ analyser_path = find_analyser_zpipe (lang )
227+
218228 if analyser_path is None :
219229 search_paths = ", " .join (str (p ) for p in lang_resource_dirs (lang ))
220230 archive_name = f"{ LANGUAGES .get (lang , lang )} .zpipe"
You can’t perform that action at this time.
0 commit comments