Skip to content

Commit 37b9e4b

Browse files
committed
Load no faces.toml when the DEPOT_PATH is empty
In rare cases, it is possible that the DEPOT_PATH could be empty. As such, the assumption that first(DEPOT_PATH) will produce a valid value needs to be removed, in which case we simply won't automatically load a user faces.toml.
1 parent d7496d2 commit 37b9e4b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/StyledStrings.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ include("legacy.jl")
1818
using .StyledMarkup
1919

2020
function __init__()
21-
userfaces = joinpath(first(DEPOT_PATH), "config", "faces.toml")
22-
isfile(userfaces) && loaduserfaces!(userfaces)
21+
if !isempty(DEPOT_PATH)
22+
userfaces = joinpath(first(DEPOT_PATH), "config", "faces.toml")
23+
isfile(userfaces) && loaduserfaces!(userfaces)
24+
end
2325
Legacy.load_env_colors!()
2426
end
2527

0 commit comments

Comments
 (0)