Skip to content

Commit d52616b

Browse files
authored
Merge pull request #6683 from tamasvajk/feature/csv-coverage-fix
Only leave CSV coverage updater job enabled on github/codeql
2 parents 93f9097 + 80f5ec2 commit d52616b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/csv-coverage-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
update:
1010
name: Update framework coverage report
11-
if: github.event.repository.fork == false
11+
if: github.repository == 'github/codeql'
1212
runs-on: ubuntu-latest
1313

1414
steps:

misc/scripts/library-coverage/utils.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,16 @@
88
def subprocess_run(cmd):
99
"""Runs a command through subprocess.run, with a few tweaks. Raises an Exception if exit code != 0."""
1010
print(shlex.join(cmd))
11-
return subprocess.run(cmd, capture_output=True, text=True, env=os.environ.copy(), check=True)
11+
try:
12+
ret = subprocess.run(cmd, capture_output=True,
13+
text=True, env=os.environ.copy(), check=True)
14+
if (ret.stdout):
15+
print(ret.stdout)
16+
return ret
17+
except subprocess.CalledProcessError as e:
18+
if (e.stderr):
19+
print(e.stderr)
20+
raise e
1221

1322

1423
def subprocess_check_output(cmd):

0 commit comments

Comments
 (0)