File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,6 +214,17 @@ def _add_env_if_not_empty(lst, value):
214214 lst .add (value )
215215
216216
217+ def generate_toc (root ):
218+ return str (
219+ (
220+ try_to_run (['git' , 'ls-files' ], cwd = root ) or
221+ try_to_run (['git' , 'ls-files' ]) or
222+ try_to_run (['hg' , 'locate' ], cwd = root ) or
223+ try_to_run (['hg' , 'locate' ])
224+ )
225+ ).strip () or ""
226+
227+
217228def main (* argv , ** kwargs ):
218229 root = os .getcwd ()
219230
@@ -623,10 +634,7 @@ def main(*argv, **kwargs):
623634
624635 # Build TOC
625636 # ---------
626- toc = str ((try_to_run (['git' , 'ls-files' ], cwd = root ) or
627- try_to_run (['git' , 'ls-files' ]) or
628- try_to_run (['hg' , 'locate' ], cwd = root ) or
629- try_to_run (['hg' , 'locate' ]) or ['' ])).strip ()
637+ toc = generate_toc (root )
630638
631639 if codecov .prefix :
632640 prefix = codecov .prefix .strip ('/' )
You can’t perform that action at this time.
0 commit comments