Skip to content

Commit 083faaf

Browse files
committed
Compatible with old package versions.
1 parent 839288f commit 083faaf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dependency.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def check_linguist(ctx: util.DotDict) -> Dict[str, bool]:
99
""" Install linguist and check if it's installed successfully. """
1010
if util.run_with_check('which gem'):
1111
if not util.run('gem list --local -q github-linguist', check=False):
12-
util.run_with_check('gem install github-linguist', capture=False)
12+
util.run_with_check('gem install github-linguist', stdout=None)
1313
ruby_script = os.path.join(ctx.run_dir, 'linguist.rb')
1414
linguist_cmd = 'ruby {0} {1}'.format(ruby_script, ctx.run_dir)
1515
result = {

static/examples/report.png

139 KB
Loading

util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ def run(cmd: str, shell=True, stdout=subprocess.PIPE, timeout=600, check=True) -
2323
return res.stdout.decode('utf8').strip()
2424

2525

26-
def run_with_check(cmd: str, capture=True, timeout=600) -> bool:
26+
def run_with_check(cmd: str, stdout=subprocess.PIPE, timeout=600) -> bool:
2727
""" Return true if cmd ran successfully else false. """
2828
try:
29-
subprocess.run(cmd, shell=True, capture_output=capture, timeout=timeout, check=True)
29+
subprocess.run(cmd, shell=True, stdout=stdout, timeout=timeout, check=True)
3030
except Exception as e:
3131
print(e)
3232
return False

0 commit comments

Comments
 (0)