blueprints: ignore hidden files in discovery (#5472)
blueprints: ignore hidden files Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
a3f1e7a4d1
commit
5509bce3d7
|
@ -101,7 +101,10 @@ def blueprints_find():
|
||||||
"""Find blueprints and return valid ones"""
|
"""Find blueprints and return valid ones"""
|
||||||
blueprints = []
|
blueprints = []
|
||||||
root = Path(CONFIG.y("blueprints_dir"))
|
root = Path(CONFIG.y("blueprints_dir"))
|
||||||
for path in root.glob("**/*.yaml"):
|
for path in root.rglob("**/*.yaml"):
|
||||||
|
# Check if any part in the path starts with a dot and assume a hidden file
|
||||||
|
if any(part for part in path.parts if part.startswith(".")):
|
||||||
|
continue
|
||||||
LOGGER.debug("found blueprint", path=str(path))
|
LOGGER.debug("found blueprint", path=str(path))
|
||||||
with open(path, "r", encoding="utf-8") as blueprint_file:
|
with open(path, "r", encoding="utf-8") as blueprint_file:
|
||||||
try:
|
try:
|
||||||
|
|
Reference in New Issue