Skip to content

Commit 94ae0a2

Browse files
authored
Merge pull request codecov#255 from codecov/thiago/b/fix-command-no-hg
Fixing command for when neither hg or git are available
2 parents 3fe855a + 9f5b09e commit 94ae0a2

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

codecov/__init__.py

+8-10
Original file line numberDiff line numberDiff line change
@@ -229,17 +229,15 @@ def _add_env_if_not_empty(lst, value):
229229

230230

231231
def generate_toc(root):
232-
return (
233-
str(
234-
(
235-
try_to_run(["git", "ls-files"], cwd=root)
236-
or try_to_run(["git", "ls-files"])
237-
or try_to_run(["hg", "locate"], cwd=root)
238-
or try_to_run(["hg", "locate"])
239-
)
240-
).strip()
241-
or ""
232+
res = (
233+
try_to_run(["git", "ls-files"], cwd=root)
234+
or try_to_run(["git", "ls-files"])
235+
or try_to_run(["hg", "locate"], cwd=root)
236+
or try_to_run(["hg", "locate"])
242237
)
238+
if res is None:
239+
return ""
240+
return str(res).strip() or ""
243241

244242

245243
def main(*argv, **kwargs):

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
from setuptools import setup
33

4-
version = "2.1.0"
4+
version = "2.1.1"
55
classifiers = [
66
"Development Status :: 5 - Production/Stable",
77
"Environment :: Plugins",

0 commit comments

Comments
 (0)