mirror of
https://github.com/konpa/devicon.git
synced 2025-08-22 22:24:43 +02:00
Add fix for bad zip file and logging for build (#1069)
This commit is contained in:
8
.github/scripts/build_assets/util.py
vendored
8
.github/scripts/build_assets/util.py
vendored
@@ -4,13 +4,17 @@ from typing import List
|
||||
import platform
|
||||
import sys
|
||||
import traceback
|
||||
from io import FileIO
|
||||
|
||||
def exit_with_err(err: Exception):
|
||||
def exit_with_err(err: Exception, logfile: FileIO=None):
|
||||
"""
|
||||
Exit the current step and display the err.
|
||||
:param: err, the error/exception encountered.
|
||||
"""
|
||||
traceback.print_exc()
|
||||
if logfile:
|
||||
traceback.print_exc(file=logfile)
|
||||
else:
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user