mirror of
https://github.com/konpa/devicon.git
synced 2025-08-22 22:24:43 +02:00
Added working workflow file
This commit is contained in:
6
.github/scripts/build_assets/util.py
vendored
6
.github/scripts/build_assets/util.py
vendored
@@ -2,6 +2,7 @@ from typing import List
|
||||
import xml.etree.ElementTree as et
|
||||
from pathlib import Path
|
||||
import os
|
||||
import json
|
||||
import platform
|
||||
import sys
|
||||
import traceback
|
||||
@@ -24,6 +25,8 @@ def check_svgs(svg_file_paths: List[Path]):
|
||||
The style must not contain any 'fill' declarations.
|
||||
If any error is found, they will be thrown.
|
||||
:param: svg_file_paths, the file paths to the svg to check for.
|
||||
:return: None if there no errors. If there is, return a JSON.stringified
|
||||
list with the error messages in it.
|
||||
"""
|
||||
# batch err messages together so user can fix everything at once
|
||||
err_msgs = []
|
||||
@@ -63,7 +66,8 @@ def check_svgs(svg_file_paths: List[Path]):
|
||||
err_msgs.append("\n".join(err_msg))
|
||||
|
||||
if len(err_msgs) > 0:
|
||||
raise Exception("Errors found in these files:\n" + "\n\n".join(err_msgs))
|
||||
return "\n\n".join(err_msgs)
|
||||
return 'None'
|
||||
|
||||
|
||||
def set_env_var(key: str, value: str, delimiter: str='~'):
|
||||
|
Reference in New Issue
Block a user