File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,17 @@ def _add_env_if_not_empty(lst, value):
214
214
lst .add (value )
215
215
216
216
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
+
217
228
def main (* argv , ** kwargs ):
218
229
root = os .getcwd ()
219
230
@@ -623,10 +634,7 @@ def main(*argv, **kwargs):
623
634
624
635
# Build TOC
625
636
# ---------
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 )
630
638
631
639
if codecov .prefix :
632
640
prefix = codecov .prefix .strip ('/' )
You can’t perform that action at this time.
0 commit comments