MCPcopy Create free account
hub / github.com/DFHack/dfhack / print_stderr

Function print_stderr

ci/script-syntax.py:8–21  ·  view source on GitHub ↗
(stderr, args)

Source from the content-addressed store, hash-verified

6
7
8def print_stderr(stderr, args):
9 if not args.github_actions:
10 sys.stderr.write(stderr + '\n')
11 return
12
13 for line in stderr.split('\n'):
14 print(line)
15 parts = list(map(str.strip, line.split(':')))
16 # e.g. luac prints "luac:" in front of messages, so find the first part
17 # containing the actual filename
18 for i in range(len(parts) - 1):
19 if parts[i].endswith('.' + args.ext) and parts[i + 1].isdigit():
20 print('::error file=%s,line=%s::%s' % (parts[i], parts[i + 1], ':'.join(parts[i + 2:])))
21 break
22
23
24def main(args):

Callers 1

mainFunction · 0.85

Calls 3

listFunction · 0.85
printFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected