mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Better ipd crash report printing
This commit is contained in:
24
.github/workflows/ci.py
vendored
24
.github/workflows/ci.py
vendored
@@ -22,19 +22,17 @@ SW = None
|
|||||||
def do_print_crash_reports():
|
def do_print_crash_reports():
|
||||||
print('Printing available crash reports...')
|
print('Printing available crash reports...')
|
||||||
if is_macos:
|
if is_macos:
|
||||||
time.sleep(60)
|
end_time = time.monotonic() + 90
|
||||||
for cdir in (os.path.expanduser('~/Library/Logs/DiagnosticReports'), '/Library/Logs/DiagnosticReports', '/cores'):
|
while time.monotonic() < end_time:
|
||||||
if not os.path.exists(cdir):
|
time.sleep(1)
|
||||||
continue
|
items = glob.glob(os.path.join(os.path.expanduser('~/Library/Logs/DiagnosticReports'), 'kitty-*.ips'))
|
||||||
print(cdir)
|
if items:
|
||||||
found = False
|
break
|
||||||
for f in glob.glob(os.path.join(cdir, 'kitty_*')):
|
if items:
|
||||||
found = True
|
time.sleep(1)
|
||||||
print(os.path.basename())
|
print(os.path.basename(items[0]))
|
||||||
with open(f) as src:
|
with open(items[0]) as src:
|
||||||
print(src.read())
|
print(src.read())
|
||||||
if not found:
|
|
||||||
print('\n'.join(os.listdir(cdir)))
|
|
||||||
else:
|
else:
|
||||||
run('sh -c "echo bt | coredumpctl debug"')
|
run('sh -c "echo bt | coredumpctl debug"')
|
||||||
print(flush=True)
|
print(flush=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user